Design: Blue-Green Deployment System
Design the deployment strategy and infrastructure for blue-green deployment of microservices. Exclude CI/CD pipeline details and code-level rollback mechanisms.
Functional Requirements
Non-Functional Requirements
Jump into concepts and practice - no test required
+-------------------+
| Users/Clients |
+---------+---------+
|
v
+---------+---------+
| Load Balancer / |
| API Gateway |
+----+--------+----+
| |
+-------+ +-------+
| |
+------+-------+ +-------+------+
| Blue Env | | Green Env |
| (Current) | | (New Version)|
+--------------+ +--------------+
| |
+------+-------+ +-------+------+
| Microservices| | Microservices|
+--------------+ +--------------+
| |
+------+-------+ +-------+------+
| Database(s) | | Database(s) |
+--------------+ +--------------+current_env = "blue"
new_env = "green"
if current_env == "blue":
current_env = new_env
else:
current_env = "blue"
print(current_env)
What will be the output?