Replication Yandex StoreDoc
Yandex StoreDoc supports replication by default: if a cluster has multiple active hosts, they automatically select a primary replica to process write queries.
When changing the primary replica manually, Yandex StoreDoc will automatically select a new primary replica from the available hosts.
Assigning a different host as a master if the primary master fails
If the master host fails, Yandex StoreDoc will automatically select a new master from among the available hosts.
You can influence master selection in a Yandex StoreDoc cluster by configuring priorities for cluster hosts. The host with the highest priority will become a new master.
You can set the host priority using the YC CLI, API, or Terraform:
- When creating a cluster or a host in a cluster.
- When changing the host settings.
Minimum value (lowest priority): 0. A host with such priority value can become a master only if there are no other hosts suitable for the role. Default priority value: 1. You can specify a value higher than 100.