A cloud administrator needs to promote an existing Cloud SQL read replica to an independent, standalone database instance to complete a planned regional workload separation. Arrange the operational steps in the correct chronological order to execute this promotion safely without data loss.
- 1Stop incoming write operations from application workloads to the primary Cloud SQL instance.
- 2Monitor Cloud SQL metrics to confirm that replication lag on the read replica has reached zero.
- 3Execute the command `gcloud sql instances promote-replica` for the target instance.
- 4Reconfigure application database connection strings to point to the IP address of the newly promoted standalone instance.
Cevap
The correct operational sequence is: 1) Stop incoming write operations from application workloads to the primary Cloud SQL instance, 2) Monitor Cloud SQL metrics to confirm that replication lag on the read replica has reached zero, 3) Execute the command `gcloud sql instances promote-replica` for the target instance, and 4) Reconfigure application database connection strings to point to the IP address of the newly promoted standalone instance.
To safely promote a Cloud SQL read replica without data loss, write operations to the primary instance must first be stopped. Next, administrators must verify that replication lag has dropped to zero so all committed transactions are reflected on the replica. Once synchronized, the promotion command is executed to convert the replica into a standalone instance. Finally, application configurations are updated to direct traffic to the new database endpoint.
Adım Adım Çözüm
Anahtar Kavram
Cloud SQL Read Replica Promotion Procedure