Tags
Applications are often built on multiple services (e.g. Redis, MySQL, gunicorn, nginx) and distributed across several machines to maintain high availability and resiliency. When there is a new release, you might have to take some of those services down, so they could be updated. This might cause down-time when a service is updated, but there are several ways to minimize or eliminate it. Below are a few popular deployment strategies.
- Blue-Green
- You operate two identical production environments (i.e. Blue and Green).
- Only one environment is live (e.g. Blue).
- A new version of the software is deployed in the not live environment (e.g. Green).
- Once the Green environment is tested and ready, you can switch the router/load balancer so all requests forward to this environment instead of the Blue one.
- A-B
- You operate two or more production environments at the same time.
- The simplest form of A/B deployment is to divide traffic between two or more environments – 50% of visitors see variation A. 50% of visitors see variation B.
- Canary
- You deploy changes to a small subset of servers, test it, and then roll out the changes to the rest of the servers.
- Canary deployment serves as an early warning. If a canary deployment fails, the rest of the servers are not affected.