A financial platform hosts its mission-critical transactions API on Compute Engine Managed Instance Groups (MIGs) behind an External HTTP(S) Load Balancer. The engineering team is planning a zero-downtime blue-green deployment for a major application version that includes database schema changes. To ensure high availability and prevent deployment pipeline failures during the environment cutover, which TWO architectural and operational steps must the team implement?
- Apply database schema modifications using an expand-contract migration pattern to ensure full backward compatibility with the active blue environment prior to shifting traffic.Answer
- Verify and request regional Compute Engine CPU and instance quota increases in advance to accommodate running blue and green environments in parallel.Answer
- CExecute breaking database DDL scripts on the production database immediately prior to switching the Load Balancer backend service target to the green environment.
- DReplatform the application to Google Kubernetes Engine (GKE) Enterprise clusters specifically to eliminate the need for load balancer backend switching during blue-green cutovers.
Answer
The team must apply database schema modifications using an expand-contract migration pattern and verify/request regional Compute Engine resource quota increases prior to deployment.
In a blue-green deployment pattern with a shared database, database schema changes must be backward-compatible (using an expand-contract pattern) so that the active blue environment continues to function normally while the green environment is deployed. Additionally, because blue-green deployments require running two identical environments side-by-side during validation and cutover, regional Compute Engine resource quotas must be requested and verified in advance to prevent provisioning errors.
Step-by-Step Solution
Key Concept
Blue-Green Deployment Infrastructure Requirements and Database Schema Compatibility