Question

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

A healthcare technology provider is deploying a major version update to its patient telemonitoring microservice hosted on Google Cloud Run and backed by a Cloud SQL for PostgreSQL database. The release requires structural changes to relational data tables and uses Cloud Deploy for canary traffic shifting. Which TWO engineering practices should be implemented in the deployment strategy to guarantee zero downtime and prevent service failures during the rollout?

  1. Apply an expand-contract database migration strategy, ensuring schema modifications remain backward-compatible with the active application revision prior to initiating traffic splitting.Answer
  2. B
    Execute destructive database DDL modifications simultaneously when shifting initial canary traffic to synchronize database fields with new application code.
  3. Configure automated canary verification and rollback criteria in Cloud Deploy based on Cloud Monitoring error budget and latency metrics.Answer
  4. D
    Replatform the stateless Cloud Run microservice to a multi-zone Google Kubernetes Engine (GKE) cluster specifically to enable basic HTTP revision traffic allocation.

Answer

The deployment strategy must incorporate an expand-contract database schema migration pattern and automated canary verification using Cloud Deploy integrated with Cloud Monitoring metrics.
Zero-downtime releases backed by relational databases require strict separation between schema migrations and application rollouts. An expand-contract schema pattern ensures that additive database modifications remain compatible with both old and new code versions. Furthermore, using Cloud Deploy automated canary verification enables real-time metric tracking and automatic rollback if the new revision exhibits abnormal error behavior.

Step-by-Step Solution

1
Decouple database schema changes from application code deployment by using an expand-contract pattern.
Database changes (such as adding new columns as nullable) allow both legacy and new application revisions to function concurrently during traffic shifting.
Prevents active legacy instances from throwing database query errors during the canary phase.
2
Leverage Cloud Run's native revision traffic splitting combined with Cloud Deploy release pipelines.
Traffic can be incrementally routed (e.g., 10%, 50%, 100%) to the candidate revision.
Allows real-world validation on a subset of user traffic with minimal blast radius.
3
Configure Cloud Deploy automated verification rules using Cloud Monitoring metrics.
High error rates or latency anomalies trigger an automatic rollback to the original stable revision.
Ensures immediate recovery if regressions are detected during rollout.

Key Concept

Decoupled database migrations (expand-contract) combined with automated canary deployment and rollback triggers.
Rate this question