Deployment strategies

What is it? Why we need it?

  • A deployment strategy is any technique employed by DevOps teams to successfully launch a new version of the software solution they provide.
  • These techniques cover how network traffic in a production environment is transitioned from the old version to the new version. Based on the firm’s specialty, a deployment strategy can influence downtime and the company’s operational cost.

Recreate Deployment

In this deployment strategy, the dev team shuts down the old version of the application entirely, deploys the new version, and then reboots the whole system. This deployment technique creates a system downtime between shutting down the old software and booting the new one.

It is cheaper and mainly used when the software firm wants to change the application from scratch. It doesn’t require a load balancer as there’s no shifting of traffic from one version to another in the live production environment.

Blue/Green Deployment

  • The new version of the software runs alongside the old version.
  • The stable or the older version of the application is always blue or red, while the newer version is green or black.
  • After the new version has been tested and certified to meet all the requirements, the load balancer automatically switches the traffic from the older version to the newer version.
  • image
  • Pro: no downtime of app, very quick rollback
  • Con: costly, because you run both the new and old version
  • Engineers mostly use this method in mobile app development and deployment.

Canary Deployment

The deployment team sets up the new version and then gradually shifts the production traffic from the older version to the newer version.

image

Pros

  • Catch Problems Early

Cons

  • Deployment complexity

Ramped Deployment (Rolling Update Deployment Strategy)

The ramped deployment strategy gradually changes the older version to the new version. Unlike canary deployment, the ramped deployment strategy makes its switch by replacing instances of the old application version with the instances from the new application version one instance at a time.

This strategy gives zero downtime and also enables performance monitoring. Nevertheless, the rollback duration is long in case there is an unexpected event. This is because the downgrading process to the initial version follows the same cycle, one instance at a time.

Cons: No warm rollback services if some problem arises.

image

Pros

  • Easy on Kubernetes
  • No Downtime on upgrade

Cons

  • Multiple versions of same service active during the overlap
  • No warm rollback services

Shadow Deployment

In a shadow deployment, the new version of the service is started, and all traffic is mirrored by the load balancer. That is, requests are sent to the current version and the new version, but all responses come only from the existing stable version. In this way, you can monitor the latest version under load without any possibility of customer impact. This strategy is sometimes called a mirrored canary deployment.

Pros

  • Catch production problems without custom impact

Cons

  • Deployment complexity
  • Architectural complexity

Deployment and Testing

Dev, QA, Staging, Prod

SuperMade with Super