Soru

Zorluk: ZorRelease Management and Deployment Strategies

An enterprise engineering team is implementing a zero-downtime Blue-Green release process on Google Cloud for a critical transactional service backed by a Cloud Spanner database. The release includes non-backward-compatible application logic and database schema changes. In which logical sequence should the team perform the deployment operations to ensure zero service disruption and safe rollback capabilities?

  1. 1Apply additive (expand phase) DDL statements to Cloud Spanner to introduce new tables/columns while maintaining legacy schema components.
  2. 2Deploy the updated application version to the isolated green environment and verify health checks and internal telemetry.
  3. 3Update the Cloud Load Balancer URL map to switch 100% of live production traffic from the blue environment to the green environment.
  4. 4Apply destructive (contract phase) DDL statements to Cloud Spanner to clean up deprecated columns after draining and decommissioning the blue environment.

Cevap

The correct sequence is: First, apply additive database schema changes (expand phase). Second, deploy and validate the new version in the isolated green environment. Third, switch live traffic to the green environment using the Cloud Load Balancer. Fourth, execute destructive schema cleanup (contract phase) after decommissioning the legacy blue environment.
Safe release management with database migrations requires an expand-contract pattern. Additive database changes must precede application deployment so the active environment remains unaffected. Next, the new code version is deployed to an isolated green environment for verification. Once validated, traffic is shifted atomically at the load balancer layer. Finally, after the legacy blue environment is drained and decommissioned, destructive database cleanup (contract phase) can safely run.

Adım Adım Çözüm

1
Execute expand-phase DDL operations on the database.
Database supports both old and new schema fields simultaneously without breaking the active production version.
Prevents database errors in the currently active blue environment while preparing the database for the new software version.
2
Deploy and test the new release in the green environment.
The green environment is fully provisioned, initialized, and health-checked without accepting public traffic.
Ensures that application startup, dependencies, and diagnostic endpoints are fully functional prior to traffic cutover.
3
Shift production traffic to the green environment.
Cloud Load Balancer directs incoming end-user requests to the green environment instances.
Achieves zero-downtime cutover while keeping the blue environment on standby for immediate rollback if unexpected errors occur.
4
Decommission the blue environment and execute contract-phase DDL cleanup.
Legacy compute resources are released and deprecated database fields are removed.
Completes the release lifecycle safely after confirming stability and closing the rollback window.

Anahtar Kavram

Zero-Downtime Blue-Green Deployments with Expand-Contract Database Schema Migration
Tahmini Süre:2m 30s
Bu soruyu puanla