In the scenarios where reads are more than writes, read/write splitting instances of ApsaraDB for Redis support multiple specifications to meet various business requirements.
Read/write splitting instances of ApsaraDB for Redis are suitable for workloads where reads are more than writes. These instances ensure high availability (HA) and high performance, and support multiple specifications. The read/write splitting architecture allows a large number of concurrent requests to read hot data from read replicas. This can reduce the loads on the master node and minimize your costs of operations and maintenance (O&M).
A read/write splitting instance of ApsaraDB for Redis consists of multiple proxy servers, a master node, a replica node, and one or more read replicas.
As a hot standby node, the replica node does not provide services. Read replicas only process read requests. Proxy servers forward write requests to the master node and forward read requests to the master node or one of the read replicas based on weights. The weight of each node is determined by the system and cannot be customized.
The HA system monitors the status of each node. If a master node fails, the HA system performs a failover between the master node and the replica node. If a read replica fails, the HA system creates a new read replica to process read requests. During this process, the HA system updates the routing and weighting information.
The read/write splitting architecture supports chain replication. This allows you to scale out read replicas to increase the read capacity. The source code of the replication process has been customized and optimized by specialists of Alibaba Cloud to maximize workload stability during replication.
When an application is connected to the read/write splitting instance, a proxy server identifies read and write requests, performs load balancing, and forwards the requests to different nodes based on weights. Write requests are forwarded to the master node, and read requests are evenly distributed among the master node and read replicas.
Cluster instances of ApsaraDB for Redis are developed based on the native Redis protocol and are compatible with all Redis commands. You can upgrade a standard master-replica instance to a read/write splitting instance with a few clicks. You can also migrate data from an on-premises Redis database to a read/write splitting instance of ApsaraDB for Redis. Both instance upgrades and data migrations can be performed without the need to disrupt services.
- High availability
- Alibaba Cloud has developed an HA system for read/write splitting instances. The HA system monitors the status of all nodes on an instance to guarantee high availability. If a master node fails, the HA system will switch the workload from the master node to the replica node and update the instance topology. If a read replica fails, the HA system will enable another read replica. It will then synchronize data and forward read requests to this enabled read replica and suspend the failed read replica.
- The proxy server module detects the service status of each read replica in real time. If a read replica is unavailable due to an exception, the proxy server module reduces the weight of this read replica. After a read replica cannot be connected for a specified number of times, the system suspends the read replica and forwards read requests to available read replicas. If the unavailable read replica recovers, the system enables and continues to monitor the read replica.
- High performance
The read/write splitting instance supports chained replication. You can scale out the read replicas to increase the read capacity and optimize the usage of physical resources for each read replica.
- High QPS
Standard instances of ApsaraDB for Redis cannot support high queries per second (QPS) scenarios. If reads of your workloads are more than writes, you must deploy multiple read replicas. This allows you to fix the performance bottleneck issue caused by a single-threading model. You can attach one, three, or five read replicas to a cluster instance of ApsaraDB for Redis. Compared with a standard instance, the cluster instance has the QPS performance improved by about five times.
- More native Redis features
Read/write splitting instances are compatible with all Redis commands. You can migrate data to these instances without disrupting services.
- Persistent storage on ApsaraDB for Redis instances
Read/write splitting instances support data persistence, backup, and recovery to ensure data reliability.