Redis cluster fault tolerance
By default, a Managed Databases Redis cluster consists of a single master node. To ensure cluster fault tolerance, you need to add replicas to it. In multi-node clusters, one node will be a master node, and the others will be replicas.
For example, if you have created a three-node cluster, the cluster will have one master node and two replicas. If you add more nodes, they will act as replicas.
When adding replicas, consider the node allocation type in the cluster.
Master node
By default, a cluster consists of one primary node — the master node. When connected to the master node, all read and write operations are available.
All data changes on the master node are replicated to the replicas. The replication process does not affect the performance of the replicas or the master node.
Replicas
Replicas are full copies of the master node. They are available for read-only operations.
Having replicas in the cluster ensures its fault tolerance — if the master node becomes unavailable, its role is taken over by one of the replicas, and the cluster continues to function normally. When the master node is restored, it takes on the role of a replica. Note that the master node address will change.
For a cluster with replicas, an SLA applies — we guarantee 99.95% write availability and 99.99% read availability.
If there are no replicas in the cluster, it will be unavailable until the master node is restored. Data will not be lost in this case.
We recommend creating fault-tolerant clusters with replicas or adding replicas to existing clusters.
Node placement type
The node placement type in a cluster depends on:
- whether there are replicas in the cluster;
- the type of pool where the cluster is located;
- the number of segments in the pool;
- the configuration line.
You can view the list of pools and segments in the Servercore Infrastructure guide Locations: countries, regions, availability zones, pools, and data center addresses.
Four node placement types are available:
- Single-Segment;
- Multi-Segment;
- Single-AZ;
- Multi-AZ.
Single-Segment
Multi-Segment
Single-AZ
Multi-AZ
ноды размещаются in одном сегменте однозонального пула. применимо:
- clusters without replicas;
- clusters with replicas located in pools with only one segment;
- clusters with replicas in HighFreq and Dedicated configuration lines.
For example, you have created a three-node cluster (one master node and two replicas) in a HighFreq configuration in the ru-2 pool. All nodes will be placed in the same pool segment, for example, in ru-2c.
Change the number of replicas
You can increase or decrease the number of replicas. When the number of replicas is changed, the cluster continues to function.
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Settings tab.
- Click Change configuration.
- In the Fault Tolerance block, in the Node count field, specify the new number of replicas. If there are no free addresses in the subnet to which the cluster is connected, a replica cannot be added, as each new replica occupies a new address in the subnet.
- Click Save.