You are viewing an older version of this section. View current production version.
Scale a Cluster
A cluster can be scaled up or down horizontally and vertically.
Scaling a cluster up or down horizontally means increasing or decreasing the number of nodes available. The number of child aggregator and leaf nodes can be adjusted independently.
To adjust the number (count) of aggregators, edit the
spec.aggregatorSpec.count field in
The value of this field is the sum of the number of Master Aggregators and child aggregators. There is only one Master Aggregator, so the number of child aggregators are always
spec.aggregatorSpec.count - 1. Only the Master Aggregator will be deployed when this field is set to
To adjust the number of leaf nodes, edit the
spec.leafSpec.count field in
memsql-cluster.yaml file. This value will be the number of leaf nodes in one availability group (AG).
Scaling a cluster up or down vertically means increasing or decreasing the resource capacity in each node. The following resources can be scaled up or down.
The CPU can be scaled up or scaled down. CPU request and CPU limit are determined by the following formulas:
cpu_limit = spec.[aggregatorSpec/leafSpec].height * 8
spec.[aggregatorSpec/leafSpec].heightis a float that can be specified in the
memsql-cluster.yamlfile. Refer to the memsql-cluster.yaml file for an explanation of “height.”
cpu_request = cpu_limit
cpu_request will be passed into the node pod’s spec.
Memory can be scaled up or scaled down. Memory request and memory limit are determined by the following formulas:
memory_limit = spec.[aggregatorSpec/leafSpec].height * 32
spec.[aggregatorSpec/leafSpec].heightis the same height as for CPU.
memory_request = memory_limit
memory_request will be passed into the node pod’s spec.
Storage can only be scaled up, and scaling up is only possible if the defined StorageClass has
allowVolumeExpansion set to
The following fields in
memsql-cluster.yaml control the persisted volume size for each pod, which must be expressed as integer values:
To scale up storage, ensure that there is available storage space and increase these values to the desired amount.
Apply the new values.
kubectl apply -f memsql-cluster.yaml