{question}
What is the difference between paired mode and load-balanced mode when configuring high availability?
{question}
{answer}
SingleStore DB stores data redundantly in a set of Leaves, called availability groups, to ensure high availability. SingleStore DB handles node failures by promoting the appropriate replica partitions into masters so that your databases remain online. However, if all of your machines fail, then your data is unavailable until you recover enough Leaf nodes in your cluster.
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. When a single Leaf fails, the partitions on its paired Leaf are promoted to master partitions. As a result, this Leaf has all master partitions and no replica partitions. Which increases the overall workload of this Leaf by 100%, affecting its performance.
On the other hand, load_balanced
mode places a Leaf’s replica partitions evenly across the healthy Leaves in the cluster. When a single Leaf fails, the partitions on multiple paired Leaves are promoted to master partitions. As a result, All Leaves have master partitions spreading increased workload to all Leaves thus achieving better performance.
For more information, see Managing High Availability.
{answer}