# Enable Master Aggregator High Availability

To enable high availability for the Master Aggregator (MA HA), set `masterAggregatorSpec.count` to the desired number of Master Aggregator replicas in the `sdb-cluster.yaml` cluster custom resource (CR) file.

```yaml
spec:
  masterAggregatorSpec:
    count: 3
```

SingleStore recommends an odd number of Master Aggregator replicas. Any `count ≥ 2` can form a quorum (quorum size is `floor(n/2) + 1`), but even counts do not improve failure tolerance over the next-lower odd count. For example, 4 replicas tolerate the same single failure as 3, so the extra replica adds cost without adding resilience, an odd number of replicas so the consensus voters can form a quorum. Three replicas are recommended for most deployments.

For improved fault tolerance, configure pod scheduling so that Master Aggregator pods are not scheduled on the same host. Use pod anti-affinity or another scheduling rule under the top-level schedulingDetails section of the cluster custom resource. Refer to [Pod Scheduling](https://docs.singlestore.com/db/v9.1/reference/singlestore-operator-reference/pod-scheduling.md) for more information.

After you apply the cluster custom resource, verify that MA HA is enabled:

```sql
SHOW VARIABLES LIKE 'consensus_enabled';
SHOW AGGREGATORS EXTENDED;
```

The following are the expected results:

* `consensus_enabled` is `ON`.
* One Master Aggregator is the leader.
* The remaining Master Aggregators are voting members.

With MA HA enabled, if the current leader fails, another voting Master Aggregator replica is automatically promoted to leader. Child aggregators are not promoted and do not participate in leader election; they continue to serve query workload. Refer to [Change Master Aggregator Disk with MA HA Enabled](https://docs.singlestore.com/db/v9.1/reference/singlestore-operator-reference/recover-from-a-master-aggregator-failure/#section-id235611122385572.md) for more information.

***

Modified at: October 20, 2026

Source: [/db/v9.1/reference/singlestore-operator-reference/enable-master-aggregator-high-availability/](https://docs.singlestore.com/db/v9.1/reference/singlestore-operator-reference/enable-master-aggregator-high-availability/)

(An index of the documentation is available at /llms.txt)
