---
title: "MySQL semi-sync cluster fault tolerance"
sidebar_label: "Cluster fault tolerance"
sidebar_position: 13
description: "Role of the master node and replicas in a MySQL semi-sync cluster, node allocation in clusters, how to change the number of replicas"
---

import ClusterFaultTolerance from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/managed-databases/common/cluster-fault-tolerance.mdx'
import Formbricks from '@theme/MDXComponents/Formbricks'

# MySQL semi-sync cluster fault tolerance

By default, a MySQL semi-sync Managed Database cluster consists of one [master node](#master-node). To ensure cluster fault tolerance, you need to add [replicas](#replicas) to it. In multi-node clusters, one node will be a master node, and the others will be replicas.

:::note

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 be replicas.

:::

When adding replicas, consider the [node allocation type](#node-allocation-type) in the cluster.

## Master node \{#master-node}

By default, a cluster consists of one main node—a master node. When connected to the master node, all operations are available: reading (`SELECT`) and writing (`INSERT`, `UPDATE`, `DELETE` and others).

All data changes on the master node are replicated to the replicas. The replication process does not affect the operation of the replicas and the master node.

## Replicas \{#replicas}

Replicas are full copies of the master node. They are available for read-only operations (`SELECT`).

The presence of replicas in a cluster ensures its fault tolerance—if the master node stops working, one of the replicas will take over its role, and the cluster will continue to operate normally. When the master node is restored, it will take on the role of a replica. The master node address will change.

&#x20;An [SLA](https://files.selectel.ru/docs/ru/conditions-cloud-platform.pdf) applies to the cluster with replicas — 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.

We recommend [creating fault-tolerant clusters](/managed-databases/mysql-semi-sync/create-cluster.mdx) with replicas or [adding replicas](#change-number-of-replicas) to existing clusters.

<ClusterFaultTolerance DatabaseName="MySQL semi-sync" slug="mysql-semi-sync" />

<Formbricks />
