This topic describes the architecture, benefits, and scenarios of RDS Cluster Edition for ApsaraDB RDS PostgreSQL.
Introduction to RDS Cluster Edition
RDS Cluster Edition for ApsaraDB RDS for PostgreSQL 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. An RDS cluster is more cost-effective, flexible, and reliable than a self-managed database. An RDS cluster is referred to as an RDS instance that runs RDS Cluster Edition.
The following table compares RDS Basic Edition, RDS High-availability Edition, and RDS Cluster Edition for ApsaraDB RDS for PostgreSQL.
Item | RDS Basic Edition | RDS High-availability Edition | RDS Cluster Edition |
Item | RDS Basic Edition | RDS High-availability Edition | RDS Cluster Edition |
Number of nodes or instances | 1 | 2 (default) 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 9 In RDS Cluster Edition, one primary node and two secondary nodes are provisioned by default. You can also create an RDS cluster that consists of one primary node and one secondary node. After an RDS cluster is created, you can add nodes to the RDS cluster. The RDS cluster can contain a maximum of nine nodes, including one primary node and eight secondary nodes. |
Readable secondary instances or nodes | N/A | Not supported | Supported |
Endpoint type | Read/write endpoint | Read/write endpoint |
|
Maximum number of unavailable instances or nodes | 0 | 1 | n - 1. n indicates the number of nodes in an RDS cluster. |
Number of zones | 1 | Less than or equal to 2 | Less than or equal to the number of nodes in an RDS cluster |
Architecture
RDS Cluster Edition for ApsaraDB RDS for PostgreSQL uses the HA architecture of one primary node and multiple secondary nodes. The following figure shows the architecture.
Benefits
In ApsaraDB RDS for PostgreSQL, RDS Cluster Edition has the following benefits compared with the RDS High-availability Edition:
More cost-effective
Secondary nodes in an RDS cluster are readable. You do not need to create read-only RDS clusters. This linearly increases the read capability of the RDS cluster and reduces resource overheads and costs. 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 the read-only routing endpoint of the RDS cluster to access the secondary nodes. You can create a read-only routing endpoint for an RDS cluster free of charge and add multiple secondary nodes to the read-only routing endpoint. Then, you can specify read weights for the secondary nodes to balance loads. For more information, see View and change the endpoints and port numbers.
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 RDS cluster and Delete a node from an RDS 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.
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 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 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.
Limits
Limits on features
Cross-zone migration is not supported.
When you create an RDS cluster, clone an RDS cluster, upgrade the major engine version of an RDS cluster, or recreate an RDS cluster, you can configure up to two secondary nodes for the RDS cluster.
When you upgrade a major engine version, the system does not automatically change read-only routing endpoints. If you use the cutover configuration method to upgrade a major engine version, you must first delete the involved read-only routing endpoints. After the upgrade is complete, you can create read-only routing endpoints.
You cannot change the RDS edition from RDS Basic Edition or RDS High-availability Edition to RDS Cluster Edition.
Limits on versions
If you want to create an RDS instance that runs RDS Cluster Edition, you must select PostgreSQL 14 or later.
References
Create an RDS instance that runs RDS Cluster Edition
For more information, see Create an instance.