Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deleting RDS Read Replicas

I recently had a RDS read replica crash, so needed to spin up a new read replica.

Now I have both read replicas there.

I want to delete the one that failed.

Is it just a case of terminating it? Does it have any affect on the master or the other read replica?

Have not ever had to do this before, so want to be sure I am doing this the right way

like image 610
Lawrence Cooke Avatar asked Dec 17 '14 20:12

Lawrence Cooke


People also ask

Can I delete RDS Read replica?

If you no longer need read replicas, you can explicitly delete them using the same mechanisms for deleting a DB instance. If you delete a source DB instance without deleting its read replicas in the same AWS Region, each read replica is promoted to a standalone DB instance.

How do I stop RDS instance with Read replica?

Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/ . In the navigation pane, choose Databases, and then choose the DB instance that you want to stop. For Actions, choose Stop.

What is RDS Read replica?

Amazon RDS Read Replicas provide enhanced performance and durability for Amazon RDS database (DB) instances. They make it easy to elastically scale out beyond the capacity constraints of a single DB instance for read-heavy database workloads.

How do I clean my RDS database?

To delete an RDS database, log in to AWS, and navigate to the RDS console. Select the database you want to delete, go to Actions, and then click on Delete. It will ask for the final snapshot, and you need to type in 'delete me' to delete the RDS database.


1 Answers

This should be a perfectly safe operation, but taking a last-minute snapshot of your master (or even the other replica, if it's on-line, replicating, and synched) wouldn't hurt.

In MySQL replication, the connection between master and replica is initiated from the replica ("slave") server side -- if a replica goes offline, the master server just closes the connection and goes about its business; there is essentially no risk to the master from a replica disappearing, even at random.

Specifically, in RDS, replicas seem fairly clearly to be designed to be disposable, and RDS also provides the ability to "promote" a replica -- which is not a promotion to being "the" master (replacing the existing one), but rather a promotion to being "a" master, an independent standalone system of its own, fully disconnected from its former relationship with its former master.

If it made you more comfortable, you could "promote" the replica first, and then delete it once you see that process complete, though simply deleting the replica should be harmless.

http://aws.amazon.com/about-aws/whats-new/2012/10/11/amazon-rds-mysql-rr-promotion/

like image 126
Michael - sqlbot Avatar answered Sep 25 '22 19:09

Michael - sqlbot