An enterprise HR platform operates a critical payroll processing service deployed across Compute Engine Regional Managed Instance Groups (MIGs) behind an External HTTP(S) Load Balancer, backed by Cloud SQL for PostgreSQL. The engineering team must execute a major release containing breaking database schema alterations (column renaming) while maintaining zero downtime and ensuring immediate rollback capabilities if anomalies are detected. Which deployment and database migration approach should you recommend?
- Implement an expand-contract database schema migration strategy to maintain backward compatibility, and perform a blue-green application deployment by shifting traffic between MIG backend services at the load balancer level.Answer
- BApply the non-backward-compatible database schema updates directly to the live Cloud SQL instance, then trigger a rolling update across the existing Managed Instance Group.
- CMigrate the entire application workload from Compute Engine MIGs to a multi-zonal Google Kubernetes Engine (GKE) cluster with Anthos Service Mesh to manage canary traffic splitting before modifying the database schema.
- DProvision a new parallel green MIG with maximum target capacity without pre-checking project quotas, modify the database schema, and update the DNS A-record to direct user traffic to the new instances.
Answer
Implement an expand-contract database schema migration strategy to maintain backward compatibility, and perform a blue-green application deployment by shifting traffic between MIG backend services at the load balancer level.
Executing a zero-downtime release with breaking database modifications requires combining the Expand-Contract database pattern with Blue-Green traffic routing. The expand-contract strategy ensures that both old and new application instances can read/write to the database concurrently during rollout. Utilizing Google Cloud's HTTP(S) Load Balancer to switch traffic between the Blue and Green backend services provides instantaneous cutover and immediate rollback capabilities without DNS caching delay.
Step-by-Step Solution
Key Concept
Blue-Green Deployment and Expand-Contract Database Schema Migration