Alibaba Cloud MySQL RDS Read Replicas provide enhanced performance and durability for database (DB) instances. This feature makes it easy to elastically scale out beyond the capacity constraints of a single DB Instance for read-heavy database workloads.
You can create one or more replicas of a given source DB Instance and serve high-volume application read traffic from multiple copies of your data, thereby increasing aggregate read throughput. Read replicas can also be promoted when needed to become standalone DB instances. Read replicas are currently made available for MySQL RDS.
With the creation of multiple replicas for distributing the read traffic for a MySQL database, managing the traffic for these instances could be a complicated task to perform.
The most common options to load balance traffic to the MySQL instances would be to either use load balancing using the client-side MySQL library or setting up an HAProxy in front of the read replicas. Both these options have their share of drawbacks and are difficult to manage.
This article will introduce a powerful feature provided by Alibaba Cloud ApsaraDB for RDS to automatically split the Read and Write requests between the instances.
Note: Currently the read/write splitting function does not support the instances located in Asia Pacific NE 1 (Japan), Germany 1 (Frankfurt), Asia Pacific SE 2 (Sydney), Middle East 1 (Dubai) or Singapore.
To enable Read/Write Splitting:
Once you are on the Connection Options Tab (You could skip the earlier step and come here directly), click on Enable Now.
You will now be provided with the list of Master and Read Replica instances.
You can either choose to follow the standard settings (No Read to Master Instance and equal split to all Read Replicas) or have a custom setting to distribute the load according to your requirement.
Note: Selecting the Internet Address option will enable an Internet Address along with the proxy setup
It might take a few minutes for the network interface to be enabled if internet option is selected. Once it's finished, the setup options can be reviewed from the Connection Options tab.
This is a very powerful feature from Alibaba Cloud ApsaraDB for RDS and will come handy when you must manage multiple read replica instances. This setup takes away the headache of manually managing the distribution of load to the read replicas. This setup can also ensure that the failed read replicas are not routed with any client traffic.
To learn more about read/write splitting on Alibaba Cloud, read the official documentation through this link.
ApsaraDB - December 5, 2018
Alibaba Clouder - February 22, 2019
Alex - November 8, 2018
Alibaba Clouder - November 29, 2017
ApsaraDB - April 1, 2019
Alibaba Clouder - October 22, 2018
Mitigate the scalability problem of single machine relational databases for large-scale online databases.Learn More
A reliable, cost-efficient backup service for continuous data protection.Learn More
An on-demand database hosting service for MySQL with automated monitoring, backup and disaster recovery capabilitiesLearn More
More Posts by Sabith