RDS Cluster Edition is supported for ApsaraDB RDS for MySQL and ApsaraDB RDS for SQL Server. This topic describes the architectures, benefits, and scenarios of RDS Cluster Edition for ApsaraDB RDS for MySQL and ApsaraDB RDS for SQL Server.

RDS Cluster Edition for ApsaraDB RDS for MySQL

RDS Cluster Edition uses a high availability (HA) architecture that contains one primary node and multiple secondary nodes and supports compute-storage separation. RDS Cluster Edition provides the following features: automated failover, primary/secondary switchover, readable secondary nodes, node addition and deletion, multi-zone disaster recovery, node-level monitoring, and cluster topology management. RDS Cluster Edition also allows you to use the MySQL group replication (MGR) mode to ensure a Recovery Point Objective (RPO) of 0. An RDS cluster is more cost-effective, flexible, and reliable than a self-managed database.

The following table compares RDS Basic Edition, RDS High-availability Edition, and RDS Cluster Edition.

ItemRDS Basic EditionRDS High-availability EditionRDS Cluster Edition
Number of nodes or instances12 (default)
Note In RDS High-availability Edition, one primary instance and one secondary instance are provisioned by default. If you require more instances, you can create read-only instances.
2 to 5
Note In RDS Cluster Edition, one primary node and two secondary nodes are provisioned by default. You can also create an ApsaraDB RDS for MySQL cluster that consists of one primary node and one secondary node. An RDS cluster is referred to as an RDS instance that runs RDS Cluster Edition. After an RDS cluster is created, you can add nodes to the RDS cluster. The RDS cluster can contain a maximum of five nodes, including one primary node and four secondary nodes.
Readable secondary instances or nodesN/ANoYes
Endpoint typeRead/write endpointRead/write endpoint
  • Read/write endpoint: This type of endpoint is used to connect to the primary node in an RDS cluster to process read and write requests.
  • Read-only endpoint: This type of endpoint is used to connect to the secondary nodes in an RDS cluster to process read requests.
Replication modeNot supportedAsynchronous replication and semi-synchronous replicationAsynchronous replication, semi-synchronous replication, and MGR
Maximum number of unavailable instances or nodes that can be accepted01n - 1. n indicates the number of nodes in an RDS cluster.
Number of zones1Less than or equal to 2Less than or equal to the number of nodes in an RDS cluster.

Architecture

RDS Cluster Edition is supported for MySQL 5.7 and MySQL 8.0. An RDS cluster uses the HA architecture of one primary node and multiple secondary nodes. The following figure shows the architecture.

Architecture

Benefit

  • More cost-effective

    Secondary nodes in an RDS cluster are readable. This linearly increases the read capability of the RDS cluster and reduces resource overheads and costs. You do not need to create read-only RDS clusters. If you use RDS High-availability Edition and you want to increase the read capability of your RDS instance, you must create read-only RDS instances. Compared with RDS High-availability Edition, RDS Cluster Edition reduces the costs by 40%.

    You can use one of the following methods to access the secondary nodes in an RDS cluster:

  • More flexible
    • Flexible node deployment

      Compared with RDS Basic Edition and RDS High-availability Edition, RDS Cluster Edition supports node topology management. After you create an RDS cluster, you can add or delete nodes based on your business requirements in a more cost-effective manner. For more information, see Add a node to an ApsaraDB RDS for MySQL cluster.

    • Node-level monitoring

      RDS Cluster Edition supports node-level monitoring. You can view the status of each node in an RDS cluster.

  • More reliable
    • Cross-zone disaster recovery

      In RDS High-availability Edition, one primary instance and one secondary instance are provisioned to ensure HA. In RDS Cluster Edition, all secondary nodes in an RDS cluster can be used for disaster recovery. We recommend that you deploy secondary nodes in different zones to achieve cross-zone disaster recovery.

    • Strong data consistency

      If more than three nodes are deployed in an RDS cluster, the MGR mode can be used for the RDS cluster. MGR is developed based on Paxos, a distributed consensus protocol. Before a transaction is committed on the primary node, the system sends the data of the transaction to secondary nodes and ensures that a majority of secondary nodes receive the data. Compared with semi-synchronous replication and asynchronous replication, MGR ensures stronger data consistency and higher data security.

    • More reliable secondary nodes

      The Alibaba Cloud technical team uses cloud native technologies to perform in-depth optimizations on ApsaraDB RDS. This improves the reliability of the secondary nodes in RDS clusters.

      • The RDS high-availability system is reconstructed. This reduces the time that is required to detect faults on the secondary nodes from minute-granularity to second-granularity.
      • The single-digit second backup feature that is provided by Elastic Block Storage (EBS) is used. This reduces the time that is required to restore data from dozens of minutes to 1 minute and allows a secondary node to recover from faults within 10 minutes in 99% of use cases.

Use scenarios

RDS Cluster Edition is suitable for large and medium-sized enterprises whose production databases need to process a large number of read requests during peak hours or need to perform intelligent data analysis. These enterprises include online retailers, automobile enterprises, education enterprises, and Enterprise Resource Planning (ERP) service providers.

Scenarios of RDS Cluster Edition for ApsaraDB RDS for MySQL

TypeDescription
Configuration of an RDS cluster
Upgrade of an RDS instance to RDS Cluster Edition
Data migration to an RDS instance that runs RDS Cluster Edition
MGR

RDS Cluster Edition for ApsaraDB RDS for SQL Server

RDS Cluster Edition is supported for SQL Server 2017 and SQL Server 2019. RDS Cluster Edition uses the Always On architecture of native SQL Server and implements compute-storage separation, and you can create read-only RDS instances to implement read/write splitting. After you create a read-only RDS instance, you can apply for a read-only endpoint to implement read/write splitting. By default, each read-only RDS instance is assigned an independent internal endpoint. The internal endpoint of a read-only RDS instance is used to connect only to that read-only RDS instance.

Note After you enable read/write splitting for a primary RDS instance that runs RDS Cluster Edition, you can specify read weights for the primary RDS instance, secondary RDS instance, and read-only RDS instances. After you enable the read-only routing endpoint, you must add the read-only routing endpoint and the endpoint of the primary RDS instance to your application. This way, your database system can route write requests to the primary RDS instance and route read requests to the read-only routing endpoint.

By default, if you use RDS Cluster Edition, your database system consists of a primary RDS instance and a secondary RDS instance. These instances work together in a high-availability architecture. You can create up to seven read-only RDS instances for your database system based on your business requirements. We recommend that you use the multi-zone deployment method to implement cross-zone disaster recovery.

The following figure shows the topology of a database system that runs RDS Cluster Edition.

Benefits

  • Scalable read capability
    You can create read-only RDS instances to linearly increase the read capability of your database system. The specifications of read-only RDS instances can be different from the specifications of the primary RDS instance. You can create read-only RDS instances that have higher specifications than the primary instance to attain a strong read capability.
    Note No secondary RDS instance is provided as a standby for a read-only RDS instance to ensure high availability.To ensure high availability, you must create at least two read-only RDS instances.
  • Flexible cost control

    Read-only RDS instances can use general-purpose and dedicated instance types, which are cost-effective. You can create read-only RDS instances to offload read requests from the primary RDS instance. This helps reduce costs and optimize system configurations. Read-only RDS instances can have lower specifications than the primary RDS instance. You can create read-only RDS instances with low specifications to process read requests from background applications, such as intelligent analytics applications. This way, you can also reduce costs.

  • Configurable read attribute of a secondary RDS instance

    If you purchase an ApsaraDB RDS instance that runs Cluster Edition, a primary RDS instance and a secondary RDS instance are provisioned. You can configure the read attribute for the secondary RDS instance. After you enable read/write splitting for the primary RDS instance that runs Cluster Edition, the secondary RDS instance serves as a read-only RDS instance by default. This helps reduce the cost of cloud migration. For more information, see Configure the read attribute for a secondary RDS instance of a primary ApsaraDB RDS for SQL Server instance.

Use cases

  • Use read-only RDS instances to offload read requests during peak hours.

    For example, you can create read-only RDS instances that have high specifications to help new retail enterprises implement read/write splitting and traffic throttling and process read requests that grow several times during large-scale online promotional events, such as Double 11.

  • Confine analytics tasks to read-only RDS instances.

    An enterprise can create an independent read-only RDS instance that uses intelligent technologies to analyze data. This reduces the probability of blocking on the primary RDS instance, increases concurrency, and mitigates interruptions to crucial workloads to ensure service stability.

Create an RDS instance that runs RDS Cluster Edition

For more information, see Create an ApsaraDB RDS for MySQL instance and Create an ApsaraDB RDS for SQL Server instance.