Setting up a MySQL read replica
The main purpose of a read-only replica is to serve read-only traffic, so that the load (namely, read-only load) from the primary database will be reduced. Read-only replicas can also be used as a disaster recovery solution because we can promote the read-only replica to the master if our master instance happened to fail. In order to create a read-only replica for MySQL, please follow this series of steps:
- Go back to the RDS console at https://console.aws.amazon.com/rds/. In the left navigation pane, click on Databases, choose the database you have created in the last step (prod-db), and then, from the Actions dropdown, select Create read replica:
- Here, keep all the settings as their defaults, except under Settings: make sure to give the DB instance identifier some meaningful name. This is used to uniquely identify your database instance (for example,
prod-db-replica
). One of the primary reasons...