Scale a MySQL semi-sync cluster
The MySQL semi-sync cloud database cluster can be scaled. For example:
- increase vCPU and RAM to improve cluster performance;
- switch from a configuration line with a local drive to another line with a local drive — the disk size must be larger than in the previous configuration, while the number of vCPUs and RAM can be increased or decreased. You can switch from a line with a local drive to a line with a network drive and vice versa only when restoring a cluster.
View the list of node configurations.
The configuration change process depends on whether replicas are present.
How it works
The configuration change process depends on whether replicas exist:
- if the cluster has no replicas, the master node will be stopped while changes are being applied, and the cluster will be temporarily unavailable for read and write operations;
- if the cluster has replicas, the cluster will remain available for read and write operations while changes are being applied. Replicas will be stopped one by one, and the configuration of each will be changed. Then, the master node will switch to one of the replicas, and the configuration of the former master node will be changed.
The configuration change time depends on the amount of data in the cluster.
Scale the cluster
If you have previously modified DBMS settings, they may be reset after scaling. Learn more about MySQL semi-sync settings when scaling a cluster.
Scale your cluster when user activity is at its lowest.
-
To avoid stopping the master node in a cluster without replicas, add a replica. You can delete the replica after scaling is complete.
-
In the Control Panel, in the top menu, click Products and select Cloud Databases.
-
Open the Active tab.
-
Open the cluster page → Settings tab.
-
Click Change configuration.
-
Select another configuration. You can:
- select a configuration with a larger disk size only;
- decrease or increase the number of vCPUs and RAM;
- switch from a configuration line with a local drive to another line with a local drive. You can switch from a line with a local drive to a line with a network drive and vice versa only when restoring a cluster.
-
Optional: increase the number of replicas in the cluster.
-
Click Save.
-
After scaling, flush the DNS cache.
-
Verify that the cluster has been scaled correctly.
Clear DNS cache
Ubuntu/Debian
CentOS
macOS
Windows
-
Open the CLI.
-
Clear the DNS cache:
sudo systemctl restart systemd-resolved