TencentDB for PostgreSQL allows you to create one or more read-only replicas to form a read-only replica group (RO group), which is suitable for read/write separation and one-primary-multiple-secondary application scenarios and capable of greatly enhancing the read load capacity of your databases. This document describes how to manage RO groups.
Note:Make sure your business has an automatic reconnection mechanism. Neither enable automatic rebalancing nor manually rebalance if there is no automatic reconnection mechanism.
When a read-only replica in a RO group becomes inaccessible due to an unexpected error, the RO group automatically removes the read-only replica. This rule is a default rule.
If this feature is enabled, a read-only replica will be removed from the RO group if the data sync log size difference between the primary instance and the read-only replica is greater than the specified threshold (MB).
The traffic of each read-only replica in an RO group will be automatically distributed according to its read weight, which can realize load balancing and reduce the difficulty of managing multiple read-only replica IP addresses. An RO group automatically allocates read weights to each read-only replica. The following table lists the read weights of read-only replicas of different specifications:
Specification | Weight |
---|---|
2 GB memory | 1 |
4 GB memory | 2 |
8 GB memory | 2 |
12 GB memory | 4 |
16 GB memory | 4 |
24 GB memory | 8 |
32 GB memory | 8 |
48 GB memory | 10 |
64 GB memory | 12 |
96 GB memory | 14 |
128 GB memory | 16 |
240 GB memory | 26 |
480 GB memory | 50 |
Was this page helpful?