Soru

Zorluk: OrtaRelease Management and Deployment Strategies

An enterprise platform engineering team is preparing to update a stateless microservice deployed on Google Cloud Run that communicates with a Cloud Spanner database. To maintain high availability during releases, the pipeline must implement a progressive canary release strategy with continuous health validation and seamless rollback capabilities. Which TWO architectural practices should the team implement to satisfy these requirements? (Select TWO.)

  1. Deploy new revisions to Cloud Run without assigning traffic, then use Cloud Run revision traffic splitting to gradually transition user requests to the new revision while monitoring error rates.Cevap
  2. B
    Assign the primitive Owner role (roles/owner) to the deployment pipeline service account to prevent permission failures during Cloud Run revision updates and Spanner DDL executions.
  3. Implement an expand-and-contract database migration strategy to guarantee that all database schema changes remain backward-compatible with older active application revisions.Cevap
  4. D
    Store the CI/CD pipeline's infrastructure state file in local ephemeral workspace storage on the build runner to reduce execution times during parallel canary rollouts.
  5. E
    Configure the container startup and liveness probes to execute deep database queries against Cloud Spanner on every check so instance health accurately reflects backend availability.

Cevap

The correct practices are to deploy new Cloud Run revisions using traffic splitting to gradually route production traffic while monitoring health metrics, and to use an expand-and-contract schema migration pattern to ensure database backward-compatibility for active and previous application revisions.
Safe progressive delivery requires separating application deployment from traffic routing and database migrations. Using Cloud Run revision traffic splitting allows engineering teams to shift small fractions of live production traffic to a new revision while verifying telemetry, providing instantaneous traffic fallback if issues arise. Simultaneously, using an expand-and-contract (decoupled) database migration approach ensures that database schema modifications are backward-compatible, allowing both old and new application revisions to coexist without database errors during canary phases or rollbacks.

Adım Adım Çözüm

1
Decouple application release from database schema changes using an expand-and-contract pattern.
Database changes (such as adding columns or tables) are applied in a backward-compatible manner before deploying new code, allowing older revisions to function alongside canary revisions without breaking.
Ensures zero-downtime rollbacks and prevents database schema changes from failing running revisions.
2
Deploy new application versions as distinct revisions in Cloud Run without shifting 100% of live traffic immediately.
A new Cloud Run revision is instantiated while the previous stable revision continues serving the majority of user requests.
Enables side-by-side deployment and isolation of new code.
3
Apply gradual traffic splitting between revisions while monitoring telemetry and error budgets.
Traffic is safely shifted in incremental steps (e.g., 5%, 25%, 100%), allowing immediate traffic rollbacks to the prior revision if metrics degrade.
Minimizes blast radius of potential deployment defects.

Anahtar Kavram

Canary Releases and Backward-Compatible Database Migrations
Tahmini Süre:2m 0s
Bu soruyu puanla