Question

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

Your Cloud Operations team is preparing to execute a blue-green release strategy for an application update on Google Cloud that includes a database schema change. To ensure zero downtime and maintain backward compatibility throughout the release, in what sequence should you perform the following operational steps?

  1. 1Apply backward-compatible database schema migrations to the shared production database.
  2. 2Deploy the updated application revision to the isolated Green deployment environment.
  3. 3Update the Cloud Load Balancing target backend service to route incoming production traffic to the Green environment.
  4. 4Decommission the legacy Blue environment infrastructure after confirming the stability of the Green deployment.

Answer

The correct sequence is: first, apply backward-compatible database schema migrations; second, deploy the updated application revision to the Green environment; third, update Cloud Load Balancing to route traffic to the Green environment; and fourth, decommission the legacy Blue environment infrastructure after stability confirmation.
In a zero-downtime blue-green deployment involving a shared database, schema changes must always be executed first and designed to be backward-compatible. This ensures that the active Blue environment remains fully functional. Once the schema supports both releases, the new code can be safely deployed into the Green environment for validation. After passing health checks, load balancer routing is updated to direct traffic to Green. Finally, after a period of stable monitoring, the legacy Blue infrastructure is safely decommissioned.

Step-by-Step Solution

1
Execute additive, backward-compatible database migrations on the existing database instance.
The database schema supports both old and new application code versions concurrently.
Applying non-breaking schema updates first prevents downtime or database exceptions on the live Blue instances.
2
Provision and deploy the new application code release into the inactive Green environment.
The Green environment is fully staged and ready for internal testing.
Isolating the new version allows automated integration and health checks without affecting live users.
3
Reconfigure Cloud Load Balancing backend service settings to shift 100% of user traffic to the Green backend.
Production traffic instantly flows to the Green application release.
Load balancer traffic shifting enables an instantaneous cutover with quick rollback capability if errors spike.
4
Monitor operational metrics and decommission the original Blue environment resource group once stability is verified.
Legacy resources are cleaned up, leaving only the active Green environment.
Teardown of legacy resources completes the deployment process and avoids unnecessary cloud infrastructure costs.

Key Concept

Zero-Downtime Blue-Green Deployment Lifecycle with Database Migration Coordination
Rate this question