SingleStore Managed Service

High Availability

An availability group is set of leaves which store data redundantly to ensure high availability. Each availability group contains a copy of every partition in the system - some as masters and some as replicas. Currently, SingleStore DB supports up to two availability groups. You can set the number of availability groups via the redundancy_level variable on the master aggregator. From this point forward, we’ll discuss the redundancy-2 case.

The placement of replica partitions in a cluster can be specified via the leaf_failover_fanout variable. SingleStore DB supports two modes for partition placement: paired and load_balanced. In paired mode, each leaf in an availability group has a corresponding pair node in the other availability group. Each leaf has its own master partitions, which SingleStore DB synchronizes to its pair as replica partitions. In other words, each leaf backs up its pair and vice versa. For this reason, each leaf stores both master and replica partitions. In the event of a failure, SingleStore DB will automatically promote replica partitions on a leaf’s pair.

diagram_paired.png

In load_balanced mode, master partitions are evenly placed on leaves. The master partitions on every leaf in an availability group have their replica partitions spread evenly among a set of leaves in the opposite availability group.

diagram_load-balanced-HA.png