A logistics enterprise hosts its core shipment-tracking application on Compute Engine Managed Instance Groups (MIGs) behind a Regional External Application Load Balancer. The application connects to a Cloud SQL for PostgreSQL database. The engineering team is planning a major application update that includes breaking changes to the database schema. The updates must be deployed with zero downtime, and the team must maintain the ability to immediately roll back traffic to the existing environment if errors occur. Which deployment and database strategy should the architect recommend?
- Implement an expand-contract database pattern by making backward-compatible schema changes first, deploy the new application version to a separate target MIG, switch load balancer traffic to the new MIG, and remove legacy database columns after validation.Answer
- BApply non-backward-compatible database DDL updates directly to the production database prior to deploying the new application code to a secondary MIG and executing the load balancer cutover.
- CMigrate the entire workload to Google Kubernetes Engine (GKE) clusters across multiple regions to utilize native GKE rolling updates for managing the database schema migration.
- DImmediately provision a full-capacity duplicate MIG in the same region without reviewing current vCPU quotas, perform the deployment, and update the backend service target.
Answer
Implement an expand-contract database pattern by making backward-compatible schema changes first, deploy the new application version to a separate target MIG, switch load balancer traffic to the new MIG, and remove legacy database columns after validation.
The correct option correctly pairs a blue-green Compute Engine MIG strategy with the expand-contract database pattern. By ensuring database changes are backward-compatible before shifting traffic via the Regional External Application Load Balancer, both old and new instances can coexist safely, enabling zero-downtime cutover and instant rollback.
Step-by-Step Solution
Key Concept
Blue-Green Deployment with Expand-Contract Database Pattern