Bobcares

AWS MariaDB Read Replica: Configuration and Setup

by | Sep 13, 2022

Let us take a closer look at the aws mariadb read replica and the configuration associated with it with the assistance of our AWS support services at Bobcares.

Configuring read Replicas with MariaDB and AWS

aws mariadb read replica

Make sure to enable automated backups on the source DB instance by setting the backup retention period to a value other than 0 before a MariaDB DB instance can act as a replication source.

A read replica that serves as the source database instance for another read replica is similarly subject to this requirement.

One DB instance can produce up to five read replicas. Each read replica must have an identical set of compute and storage resources to the source DB instance in order for replication to function properly. Scale the read replicas along with the source database instance.

We can designate a read replica as the source DB instance for another read replica if it is running any version of MariaDB.

For instance, using MyDBInstance as a starting point, we could create ReadReplica1, and then from ReadReplica1, generate ReadReplica2. MyDBInstance updates are replicated to ReadReplica1, which is subsequently copied to ReadReplica2.

Replication Chain

A replication chain can have no more than four instances. For example, we can construct ReadReplica1 from MySourceDBInstance, and then create ReadReplica2 from ReadReplica1, and then make ReadReplica3 from ReadReplica2, but we can’t generate a ReadReplica4 from ReadReplica3.

If we upgrade a MariaDB read replica, the read replicas that are replicating to other read replicas continue to function. If MyDBInstance1 replicates to MyDBInstance2, and MyDBInstance2 replicates to MyDBInstance3, then consider the example.

Replication from MyDBInstance1 to MyDBInstance2 ceases if MyDBInstance2 is promoted, yet MyDBInstance2 continues to replicate to MyDBInstance3. Create the read replica, then edit it to enable automatic backups, and then restart RDS for MariaDB to use the modified read replica.

As long as we don’t exceed the source instance’s maximum of five read replicas, we can execute multiple concurrent read replica create or delete operations that use the same source DB instance.

To Create a Read Replica From a Source DB Instance

To create a replica follow the steps given below:

  • Open the Amazon RDS console by logging into the AWS Management Console at https://console.aws.amazon.com/rds/.
  • Select Databases from the navigation window.
  • Select the database instance that will serve as a read replica’s source.
  • Choose the Create read replica button under Actions.
  • Provide a name for the read replica in the DB instance identifier field.
  • Select the instance requirements. For the read replica, it is preferable to utilize the same database instance class and storage type as the source database instance.
  • To construct a standby of the replica in another Availability Zone to provide failover support for the replica, select Yes for Multi-AZ deployment.

Creating the read replica as a Multi-AZ DB instance is independent of whether the source database is a Multi-AZ DB instance.

How to Create an Encrypted Read Replica?

Follow the steps given below to create an Encrypted read replica:

  1. First, we have to choose Enable encryption.
  2. Select the KMS key’s AWS KMS key identification as the AWS KMS key.
  3. Note It is necessary to encrypt the source DB instance. See Encrypting Amazon RDS resources for more information on encrypting the source DB instance.
  4. Add other parameters, like storage autoscaling. See Settings for DB instances for details on each setting.
  5. Finally, select Create read replica.

On the Databases area of the RDS dashboard, we can see the read replica once it has been created. In the Role column, Replica is displayed.

[Need assistance with similar queries? We are here to help]

Conclusion

To conclude we have now learned more about aws mariadb read replica and how to create a Read Replica from a DB and create an encrypted read replica instance with the support of our AWS Support Services.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.