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?
- 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
- BPerform 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.
- CReplatform 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.
- DProvision 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
Anahtar Kavram
Canary Deployment with Backward-Compatible Database Schema