Production deployment strategies

Suppose I have a load balancer connected to 10 web servers.

Also assume that the app is used 24/7 so there is no "low peak" period, that is, reasonable speed of response must be maintained.

What is the best way to deploy updated web app code to all the servers while ensuring there is zero downtime? How do companies like Google, Amazon, Facebook etc. do it?


Solution 1:

As you have a load balancer, you can configure it to stop sending requests to a node, when it's drained, update the node. Test and bring it back on line. Rinse and repeat for each backend node. And if you want faster rollouts: add more servers so you can do N-at-a-time, for whichever value of N works for you.