Soru

Zorluk: Çok zorRelease Management and Deployment Strategies (Blue-Green, Canary, Rolling)

Your organization is executing a major application update for a mission-critical microservice running on Google Kubernetes Engine (GKE). The release requires a non-backward-compatible database schema change. To meet business requirements of zero downtime and zero data loss, your architecture team chose an Expand-Contract deployment pattern combined with a Blue-Green release traffic shift via GKE Gateway API HTTPRoute resources. Arrange the operational steps below in the correct logical execution sequence from start to finish.

  1. 1Apply additive schema modifications (Expand phase) by adding new database tables and columns as nullable or with default values, ensuring the active Blue deployment remains operational.
  2. 2Deploy the Green application workload version to the GKE cluster targeting the expanded database schema, keeping its ingress traffic weight at 0%.
  3. 3Execute data migration and backfill tasks to populate new schema structures while ensuring dual-write logic syncs state between old and new fields.
  4. 4Update the GKE Gateway API HTTPRoute resource to shift 100% of incoming production traffic from the Blue service backend to the Green service backend.
  5. 5Decommission the legacy Blue GKE deployment and execute destructive schema cleanups (Contract phase) to remove deprecated database columns and tables.

Cevap

The correct sequence starts with applying additive, non-breaking database schema changes (Expand phase), followed by deploying the Green workload to GKE with zero traffic, executing data backfill and synchronization scripts, updating the GKE Gateway HTTPRoute to switch production traffic to Green, and finally removing the legacy Blue workload and deleting deprecated database schema elements (Contract phase).
The correct operational sequence follows the Expand-Contract database pattern paired with Blue-Green traffic routing. First, the database schema must be expanded additively so existing Blue instances remain functional. Second, the Green application is deployed with zero traffic to isolate verification. Third, data backfill and dual-writing occur to synchronize historical data. Fourth, traffic is shifted to Green via GKE Gateway HTTPRoute configuration. Finally, after confirming operational stability, legacy Blue deployment resources are removed and deprecated database columns are dropped during the Contract phase.

Adım Adım Çözüm

1
Expand Database Schema
Database supports both old and new schema requirements without breaking the active Blue deployment.
Prevents downtime for current Blue pods while preparing the data layer for Green pods.
2
Deploy Green Workload to GKE
Green pods are running and pass health checks, but receive 0% live traffic.
Allows verification of application startup and connectivity without exposing end users to unvalidated code.
3
Perform Data Backfill & Synchronization
Historical and active data are fully synchronized across expanded schema columns.
Guarantees zero data loss or data corruption when users switch to the Green version.
4
Shift Ingress Traffic to Green
GKE Gateway API HTTPRoute directs 100% of user traffic to Green pods.
Executes the zero-downtime cutover to the new application revision.
5
Contract Phase & Legacy Cleanup
Deprecated database fields are dropped and legacy Blue GKE resources are terminated.
Frees cluster resources and finalizes the schema refactoring safely after stability verification.

Anahtar Kavram

Expand-Contract Database Migration with Blue-Green Traffic Shifting
Bu soruyu puanla