Skip to content

Deployment Strategies

FullstackCodingGuy edited this page Dec 23, 2024 · 11 revisions

Canary deployment

Conditional release to subset of users (ex: based on % users or tenant etc)

Releases a new version to a small group of users before rolling it out to the rest. This approach allows for more granular control over the release process, and provides opportunities to test changes with real users. Canary deployment is ideal for testing new features and minimizing risks.

https://youtu.be/cTzhDlj_mXM

image
  • It is a progressive approach, allocating % of traffic to old and new pods.
  • When you dont want everything in one shot
  • Helpful for stateful applications
  • Handy when you want to test the applications first with a subset of users and then roll out for all users progressively.
  • Not handy for apps that require zero downtime for deployment as it involves effort for testing the new deployment.

Disavantage

  • Challenge in controlling traffic, how will you route the traffic for certain % of users

Blue-green deployment

Stateless and zero downtime

https://youtu.be/6zWfVqkKuyI

Maintains two identical environments, one active and one idle, and gradually shifts traffic from the active to the idle environment. This approach is ideal for minimizing downtime and enabling quick rollbacks. Blue-green deployment is best for major releases that significantly change the course of your software.

image

image
  • Useful for deploying stateless applications
  • For deploying applications without zero downtime

Disadvantage

  • More resources are needed for the switch, it needs a exact replica of what is currently running

Differences

  • When to use: Canary deployment is better for organizations with limited resources or those that prefer a more iterative approach to risk management. Blue-green deployment is better for organizations that prioritize speed and ease of deployment, and have sufficient resources to maintain two identical production environments.
  • Early Feedback: Canary deployment provides early feedback and the ability to identify bugs before the IT team rolls out the update to all users.
  • Rollback: Canary deployment allows for a quick and painless rollback if errors occur. Blue-green deployment also allows for quick rollbacks if issues arise.
  • Infra needs: Canary deployment doesn't require any spare hosting infrastructure. Blue-green deployment requires sufficient resources to maintain two identical production environments.

References

Clone this wiki locally