Alex Xu Profile picture
Co-Founder of ByteByteGo | Author of the bestselling book series: โ€˜System Design Interviewโ€™ | YouTube: https://t.co/9gPSJSrtPU

Jan 17, 2023, 9 tweets

1/ ๐–๐ก๐š๐ญ ๐ข๐ฌ ๐ญ๐ก๐ž ๐ฉ๐ซ๐จ๐œ๐ž๐ฌ๐ฌ ๐Ÿ๐จ๐ซ ๐๐ž๐ฉ๐ฅ๐จ๐ฒ๐ข๐ง๐  ๐œ๐ก๐š๐ง๐ ๐ž๐ฌ ๐ญ๐จ ๐ฉ๐ซ๐จ๐๐ฎ๐œ๐ญ๐ข๐จ๐ง?

The diagram below shows several common ๐๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ ๐ฌ๐ญ๐ซ๐š๐ญ๐ž๐ ๐ข๐ž๐ฌ.

2/ ๐๐ข๐  ๐๐š๐ง๐  ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ

Big Bang Deployment is quite straightforward, where we roll out a new version in one go with service downtime. We roll back to the previous version if the deployment fails.

๐Ÿ’ก No downtime โŒ
๐Ÿ’ก Targeted users โŒ

3/ ๐‘๐จ๐ฅ๐ฅ๐ข๐ง๐  ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ

Rolling Deployment applies phased deployment compared with big bang deployment. The whole plant is upgraded one by one over a period of time.

๐Ÿ’ก No downtime โœ…
๐Ÿ’ก Targeted users โŒ

4/ ๐๐ฅ๐ฎ๐ž-๐†๐ซ๐ž๐ž๐ง ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ

In blue-green deployment, two environments are deployed in production simultaneously. Once the green environment passes the tests, the load balancer switches users to it.

๐Ÿ’ก No downtime โœ…
๐Ÿ’ก Targeted users โŒ

5/ ๐‚๐š๐ง๐š๐ซ๐ฒ ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ

With canary deployment, only a small portion of instances are upgraded with the new version, once all the tests pass, a portion of users are routed to canary instances.

๐Ÿ’ก No downtime โœ…
๐Ÿ’ก Targeted users โŒ

6/ ๐…๐ž๐š๐ญ๐ฎ๐ซ๐ž ๐“๐จ๐ ๐ ๐ฅ๐ž

With the feature toggle, A small portion of users with a specific flag go through the code of the new feature, while other users go through normal code.

๐Ÿ’ก No downtime โœ…
๐Ÿ’ก Targeted users โœ…

7/ ๐Ÿ‘‰ Over to you: Which deployment strategies have you used?

8/ I hope you've found this thread helpful.

Follow me @alexxubyte for more.

Like/Retweet the first tweet below if you can:

Enjoy this thread?

You might like our System Design newsletter as well:

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling