# High Availability

Starting from chart version `1.40.1`, the mirrord Operator is by default highly available. This means that mirrord sessions should survive transient failures in the cluster, with respect to the set of advanced mfT features used by the session (see [advanced features](#advanced-features) section). This includes failures of nodes where the mirrord Operator pods are running.

High availability is implemented in a lightweight fasion, by saving sessions' state in the cluster's builtin etcd database (as [Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)). Therefore, no persistent volume is required. At startup, the operator restores and resumes saved sessions.

{% hint style="info" %}
This feature is available to users on the Enterprise pricing plan.
{% endhint %}

### Multiple replicas

By default, the mirrord Operator workload runs with a single replica. Starting from chart version `1.40.3`, this can be configured with the `operator.replicas` setting in the chart.

Regardless of the configured scale, only one replica acts as a leader, and serves mirrord sessions. Any additional replicas wait in a standby mode, ready to acquire leadership and resume work, in case of the current leader's failure. Configuring the operator to run with multiple replicas allows for smoother leadership transitions, since the new leader candidates are already running.

### Advanced features

Not all of the advanced mfT features have yet been migrated to highly available sessions. Sessions using such features will be forcefully terminated in case of operator pod failure.

The table below summarizes the current state of development.

| Feature         | HA | Chart version |
| --------------- | -- | ------------- |
| SQS splitting   | ✅  | `1.40.3`      |
| Kafka splitting | ❌  |               |
| Copy target     | ❌  |               |
| DB branching    | ❌  |               |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://metalbear.com/mirrord/docs/managing-mirrord/high-availability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
