Scaling a Database Cluster

Overview

Managed Databases service allows you to increase or decrease the number of replicas in the cluster, as well as change the server configuration to provide better performance of the database cluster.

Changing the Configuration of Servers in a Cluster

You can only change the configuration of the database servers upwards due to the limits on the disk space.

Follow these steps to change the configuration of the cluster servers:

  1. Go to the cluster settings page.
  2. Click Scale cluster.
  3. Select the required configuration.
  4. Save your changes.
  5. The cluster’s status will change to RESIZING. The time that the cluster will remain in this status depends on the amount of data in the cluster.
  6. Scaling process will vary depending on the number of replicas in the cluster.
  7. If there are no replicas in the cluster (the cluster consists only of the master), then the master will be stopped to apply the changes. Because of this, the cluster will be temporarily unavailable for read and write. After applying the changes, the master will start and the cluster will be available again.
  8. If there are replicas in the cluster, scaling process will not affect its operation — the cluster will be available for read and write while applying changes. For a cluster with replicas, the configuration change will look as follows:

    • first, the replicas will be stopped one by one, and their configurations will be changed;
    • after all replicas are scaled, the master will switch to a synchronous replica;
    • lastly, the “former master” will be scaled.
  9. In both cases, after successfully applying the changes, the cluster’s status will change to ACTIVE.

Changing the Number of Replicas

The presence of replicas in a cluster affects its fault tolerance. We recommend creating fault-tolerant clusters consisting of the master and replicas.

Follow these steps to change the number of replicas in a cluster:

  1. Click Scale cluster on the cluster settings page.
  2. Select the required number of replicas.

    Please note that each new replica takes a new address in the subnet. You cannot add replicas to the cluster if there are no free addresses on the subnet that the cluster is connected to.

  3. Save your changes.

  4. The cluster’s status will change to RESIZING. The cluster still will be available in this status.

  5. After the operation is completed, the cluster’s status will change to ACTIVE.