Question

Difficulty: MediumRelease Management and Deployment Strategies (Blue-Green, Canary, Rolling)

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?

  1. 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
  2. B
    Apply 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.
  3. C
    Migrate the entire workload to Google Kubernetes Engine (GKE) clusters across multiple regions to utilize native GKE rolling updates for managing the database schema migration.
  4. D
    Immediately 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

1
Analyze deployment constraints
Identified requirements for zero downtime, immediate rollback capabilities, and breaking database schema modifications.
Blue-green deployment with a dual-version compatible database layer is required to satisfy zero downtime and instant rollback.
2
Apply the Expand-Contract database pattern
Database additions (new columns/tables) are deployed in a backward-compatible manner so the legacy (blue) application continues functioning while the new (green) code is introduced.
Prevents database schema changes from breaking legacy instances during traffic transition.
3
Execute blue-green traffic switch and cleanup
Provision green MIG, validate health, update load balancer backend service weights, and contract (remove old schema elements) only after successful release.
Ensures full operational stability and seamless rollback capability throughout the release cycle.

Key Concept

Blue-Green Deployment with Expand-Contract Database Pattern
Rate this question