Google Cloud Professional Cloud Architect — Question 193
You are deploying a critical application with a stateless, containerized frontend on Cloud Run and a Cloud SQL for PostgreSQL backend. The application experiences unpredictable traffic spikes, and the business requires the ability to immediately roll back a failed deployment to the last known good state. You need to apply a deployment strategy that aligns with Site Reliability Engineering (SRE) principles for both the application code and the database schema updates, while meeting the business's requirements. What should you do?
Answer options
- A. Package the database schema migration script within the container to be executed on every container startup before the application process begins.
- B. Configure the CI/CD pipeline to use the :latest container tag for deployments, with database schema changes applied manually as needed.
- C. Separate CI/CD pipelines for database schema migrations from application deployments. When deploying a new Cloud Run revision, use gradual traffic split.
- D. Use a single CI/CD pipeline that first applies database schema changes and then deploys the new Cloud Run revision.
Correct answer: C
Explanation
Option C is correct because it aligns with SRE principles by separating concerns, allowing for independent management of database schema migrations and application deployments, while also enabling a gradual traffic split to minimize impact during updates. Options A and D do not provide a rollback mechanism or fail-safe for the database schema, and B's use of the :latest tag can lead to unpredictable deployments and difficulties in rollback.