Google Professional Cloud Database Engineer Question 212
Select 2Google Cloud PlatformYou are tasked with migrating a production database to Google Cloud SQL with minimal downtime. The database handles critical financial transactions and cannot experience interruptions longer than a few seconds. You also need to ensure a fallback plan is in place. Which of the following migration strategies should you implement?
- A
Use Database Migration Service (DMS) in continuous replication mode to sync the source database with the Cloud SQL instance, followed by a cutover during a low-traffic period.
- B
Perform a backup of the source database, restore it to the Cloud SQL instance, and then adjust DNS records during the maintenance window.
- C
Set up a dual-write approach, where both the source and Cloud SQL database are written to simultaneously, and verify data consistency before switching traffic.
- D
Use the BigQuery Data Transfer Service to migrate the database in a batch process.
- E
Implement a rollback mechanism by preserving the source database in its original state until the Cloud SQL database is verified.
Show answer and explanation
Correct answers: A, E
Explanation
For a near-zero downtime migration, Database Migration Service (DMS) with continuous replication is the most appropriate tool because it ensures minimal disruption to the production database. A fallback plan, such as preserving the source database, is essential to mitigate risk in case the migration encounters issues. The other options either introduce downtime, are overly complex, or are intended for different use cases.
- A. Correct.
This is correct because Database Migration Service (DMS) in continuous replication mode is designed for near-zero downtime migrations. The cutover process can be scheduled during a low-traffic period to minimize impact.
- B. Incorrect.
This is incorrect because performing a backup and restore process can cause an extended downtime while the database is restored and DNS records are updated.
- C. Incorrect.
This is incorrect because dual-writing can lead to data inconsistencies and adds significant complexity, especially for transactional systems like financial applications.
- D. Incorrect.
This is incorrect because BigQuery Data Transfer Service is not intended for relational database migrations; it is used for data analytics workloads.
- E. Correct.
This is correct because preserving the source database as a fallback allows you to revert to the original state if issues arise in the Cloud SQL database after the migration.