Soru

Zorluk: OrtaRelease Management and Deployment Strategies (Blue-Green, Canary, Rolling)

An energy utility company operates a serverless, stateless smart meter data processing service on Google Cloud Run, backed by Cloud SQL for PostgreSQL. The engineering team is planning a major release that includes both microservice logic updates and structural database schema alterations. The business requires zero downtime during the rollout, real-time validation of metrics on a small segment of production traffic, and an immediate zero-downtime rollback capability if error rates spike. Which release strategy and implementation approach should you recommend?

  1. Implement an expand-contract database schema migration pattern first, deploy the new application build as a new Cloud Run revision, and gradually shift traffic using Cloud Run revision traffic splitting to monitor performance before completing the rollout.Cevap
  2. B
    Perform a Blue-Green cutover by applying destructive database schema changes to remove deprecated columns immediately, then switch 100% of load balancer traffic to the new revision.
  3. C
    Replatform the stateless microservice from Cloud Run to a Google Kubernetes Engine (GKE) cluster with an Istio service mesh to handle canary traffic routing between pod deployments.
  4. D
    Provision a parallel blue-green environment by duplicating all underlying compute resources in Compute Engine Managed Instance Groups across regions without verifying regional CPU core quotas ahead of deployment.

Cevap

Implement an expand-contract database schema migration pattern first, deploy the new application build as a new Cloud Run revision, and gradually shift traffic using Cloud Run revision traffic splitting to monitor performance before completing the rollout.
The combination of an expand-contract database migration strategy with Cloud Run revision traffic splitting provides a zero-downtime canary deployment. Decoupling database changes ensures backward compatibility so both old and new revisions can safely run concurrently, while Cloud Run traffic splitting enables real-time metric validation on a small subset of live users.

Adım Adım Çözüm

1
Ensure database backward compatibility
Database changes are deployed using the expand-contract pattern (adding new fields while maintaining old ones), ensuring both old and new application versions can operate simultaneously.
Prevents breaking active application instances during phased traffic migration or rollback.
2
Deploy new Cloud Run revision
The updated container image is deployed to Cloud Run as a distinct revision receiving 0% initial traffic.
Allows staging and verification of the deployment artifact without impacting live user traffic.
3
Execute canary traffic split
Cloud Run traffic management is configured to route a small percentage (e.g., 5%) of incoming requests to the new revision while observing operational metrics.
Validates application stability against real-world production traffic with minimal risk.

Anahtar Kavram

Canary Deployment with Backward-Compatible Database Schema
Bu soruyu puanla