WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

DevOps · Beginner · question 15 of 100

What is meant by the term "blue-green deployment"?

📕 Buy this interview preparation book: 100 DevOps questions & answers — PDF + EPUB for $5

Blue-green deployment is a release management strategy designed to minimize downtime and reduce risks in software deployment. This is achieved by maintaining two production environments (cluster A and cluster B), known as the "blue" and the "green" environment. The blue and the green environments are identical and share the same infrastructure or platform, but they run different versions of the same application.

Here’s how it works:

1. One of the environments (let’s say blue) is serving live traffic.

2. The new version of the application is deployed to the other environment (green) without any disruption to the live traffic.

3. The green environment is tested and validated to ensure that it meets the necessary requirements.

4. Once the new version is ready, the load balancer (or router) is switched to redirect the traffic from the blue environment to the green environment. This switch can be instant or gradual.

5. Now the green environment is live and becomes the "blue" environment, while the original blue environment becomes the idle "green" environment.

6. The process can be repeated for future deployments, alternating between the blue and green environments.

This way, any issues in the new deployment can be quickly resolved by rolling back to the previous version (the idle environment), minimizing the impact on end-users. Blue-green deployment also facilitates easy rollbacks, as the last stable version is always available and ready for use.

As an example, consider the following diagram showing two environments A (blue) and B (green):

Load Balancer
        |
       /\ 
      /   \
     A     B

Environment A (blue) is serving live traffic, while environment B (green) is not. When a new version of the application is deployed to environment B, the load balancer can be switched to direct traffic to environment B instead. The environments would then effectively "swap" roles, with B (now blue) serving live traffic and A (now green) being available for the next deployment.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic DevOps interview — then scores it.
📞 Practice DevOps — free 15 min
📕 Buy this interview preparation book: 100 DevOps questions & answers — PDF + EPUB for $5

All 100 DevOps questions · All topics