THE DOSSIER TIMES
LOG: ROLLING-DEPLOYMENTSDATE: 2023-03-25AUTHOR: AMIT PRAKASH

Rolling Deployments

Rolling Deployments

Rolling Deployments

Rolling Deployment is one of the most straightforward deployment tactics that is a delight to use. Only because it is so straightforward and affordable makes it the most widely used deployment approach. This is the standard deployment approach used by the majority of tools.

We slowly replace older versions of the application with the new one as part of rolling deployments by replacing the supporting infrastructure.

image

For instance, in kubernetes containers, the operating service is replaced with a newer version of the code or artifact, or in an EC2 machine, the previous services are now running on a newer version of code or artifact.

Note: The infrastructure replacements take place as incoming requests are processed gradually rather than all at once.

image

As the Rolling Deployments are incremental, some servers would serve the new version of the artefact at the moment of deployment while others would provide the older versions.

As a result, the answer would be created using the appropriate version depending on which server receives the request. Because of this, backward and forward compatibility become essential features.

How to apply the Rolling Deploy method..?

The practise of rolling out is usually graceful.

  1. Pick a server for deployment.
  2. Stop in-coming traffic to it. -- Remove it form load balancer.
  3. Wait for existing request to be completed.
  4. If no Infra replacement. -- pull the latest code/artifact. -- Restart the process.

image

image

  1. If Infra replacement. -- Terminate the server -- create the new server with new code or artifact

image

  1. Attach the server with load balancer.

image

Tuning the Rolling Deployment

  1. Concurrent Server -- We can choose 'n' servers concurrently rather than selecting one server for upgrade at a time. -- This will seed-up the deployment. Note: 'n' shouldn't be excessively big or little.

image

  1. Double- Half Deployment.

The infrastructure is often doubled with new code before being restored to its original capacity in rolling deployment.

Note: Make sure your database cache can handle a lot of connection queries while doing this.

image

  1. Terminate one and Spin one.

Pros of Adopting Rolling Deployment

  1. Much faster then Blue Green deployment.
  2. Deployment ensures zero downtime.
  3. Rollouts are gradual.
  4. Any defect affect only a small set of user or requests.
  5. Cost efficient deployment strategy.

Cons of Adopting Rolling Deployment

  1. No Environment isolation between the old and new servers.
  2. Changes we rollout has to be backward compatible.
  3. Changes we rollout has to be forward compatible.
  4. Deployments takes a long time to complete.
  5. Stateful applications will be affected during the deployments.

Note: These are merely my personal worries, not the main problem.💡

THE ARCHITECTURE LOG

Explores the design decisions, trade-offs, and hidden complexity behind real-world software systems.

Subscribe on LinkedIn

Join 2,439+ Subscribers · Published Weekly

INDEX TAGS:#PreflightParty#hashtag#SecurityFirst#hashtag#DataHarmony#hashtag#NoMoreWebWalls
REVIEWED
— CLASSIFIED BACKEND ENGINEER NOW OPERATIONAL — FIELD REPORTS AVAILABLE — CASE FILES ACCESSIBLE FOR IMMEDIATE REVIEW — TRANSMISSION SECURE — PROCEED TO INTELLIGENCE PORTAL    — CLASSIFIED BACKEND ENGINEER NOW OPERATIONAL — FIELD REPORTS AVAILABLE — CASE FILES ACCESSIBLE FOR IMMEDIATE REVIEW — TRANSMISSION SECURE — PROCEED TO INTELLIGENCE PORTAL   Â