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.
- 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.
- 2Deploy the Green application workload version to the GKE cluster targeting the expanded database schema, keeping its ingress traffic weight at 0%.
- 3Execute data migration and backfill tasks to populate new schema structures while ensuring dual-write logic syncs state between old and new fields.
- 4Update the GKE Gateway API HTTPRoute resource to shift 100% of incoming production traffic from the Blue service backend to the Green service backend.
- 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
Anahtar Kavram
Expand-Contract Database Migration with Blue-Green Traffic Shifting