AWS Deployment Strategies

Jorge Freitas
3 min readMar 20, 2021

There are some strategies that you can adopt to deploy your application, the deployment strategies depend on the business model and organization goal.

Well, first of all, when you are choosing your deployment strategy, you should take into consideration the following topics:

  • Deployment time;
  • Zero Downtime (Yes/No);
  • Rollback;
  • Extra costs;
  • Reduction in current capacity;

Deployment strategies

In-Place Deployments

Updates the application version without replacing any infrastructure components. Basically, all the instances are stopped, and then the latest version is installed.

Disadvantages

  • Application availability is affected;
  • Rollback (You need to install again the old version);

Advantages

  • Do not need new infrastructure;
  • Minimizes infrastructure costs and management overhead;

More details can be found here.

Blue/Green Deployments

In this strategy, you have two separate but identical environments (Environment Blue and Green).

Environment Green: running current application version;

Environment Blue: running the new application version;

After the green environment is ready and tested, production traffic is redirected from blue to green. If any problem is found, you can redirect the traffic to the blue environment again.

Disadvantages

  • Deployment time;
  • Extra cost;

Advantages

  • Application availability is not affected;
  • Reduces deployment risk (easy rollback, just need to swap URL);
  • Zero downtime;
Blue-Green deployment

More details can be found here.

Canary Deployments

This is a subset of Blue/Green deployment. The only difference is, you redirect just a percentage of the users for the green environment (could be 10% or something), the other users (90%) stays in the blue environment. If the green environment is not operating as expected, you can route the 10% traffic back to the blue environment. The big advantage of this strategy, only a small percentage of the users were impacted.

Disadvantages

  • Deployment time;
  • Extra cost;

Advantages

  • Application availability is not affected;
  • Reduces deployment risk (easy rollback, just need to swap URL);
  • Zero downtime;
  • Just a small percentage of the users are impacted if the new environment is not working as expected.

More details can be found here.

Linear Deployments

This is a subset of Blue/Green deployment. Just like canary deployment, but with this strategy the traffic is shifted in equal increments with an equal number of minutes between each increment. Something like every 3 minutes 10% of traffic will be shifted from Blue to Green environment until achieving 100%.

I would say, the advantage and disadvantages of linear and canary deployment strategy are the same, just takes more time this strategy.

Disadvantages

  • Deployment time;
  • Extra cost;

Advantages

  • Application availability is not affected;
  • Reduces deployment risk (easy rollback, just need to swap URL);
  • Zero downtime;
  • Just a small percentage of the users are impacted if the new environment is not working as expected.

More details can be found here.

All-at-once Deployments

This is another subset of Blue/Green deployment, but all traffic is shifted from the original task set to the updated task set all at once, instead of shift the traffic in small steps.

Disadvantages

  • Deployment time (Within the Blue/Green deployments this is the faster one);
  • Extra cost;

Advantages

  • Application availability is not affected;
  • Reduces deployment risk (easy rollback, just need to swap URL);
  • Zero downtime;

More details can be found here.

If you would like to know more about configurations and so, you can check more details here.

Conclusion

There are different deployment strategies, and your organization must choose the best strategy that meets your needs. Take into consideration the deployment time, if you need zero downtime or not, the rollback complexity, extra costs, and user impact during deployment.

If you have any doubt, please let me know in the comments.

References

--

--