{question}
How to add a leaf node?
{question}
{answer}
SingleStore makes it easy to scale your cluster by adding, removing, or replacing nodes. To add a new leaf node, follow these general steps:
-
Register the host so that SingleStore tools can manage it.
sdb-toolbox-config register-host --host <hostname> -
Use sdb-deploy to install the SingleStore engine on the new host.
sdb-deploy install --host <hostname> --version <version> -
Create a new node on the host.
sdb-admin create-node --host <hostname> -
Add the node as a leaf to your cluster.
sdb-admin add-leaf --memsql-id <memsqlid>
Important:
Adding a new leaf node does not change the total number of partitions in the cluster. Instead, existing partitions are automatically redistributed across all available leaf nodes. This ensures that each node holds a balanced number of partitions and that the workload is spread evenly.
To actually increase the number of partitions, you have two options:
Recreate the database with a new partition count: Export the data, drop the database, and create a new one with the desired number of partitions.
Use the split backup feature: Take a backup with split-partitions, then restore it to a database with double the original partition count.
If your deployment is managed by the Kubernetes operator, you can adjust the number of leaf nodes through the operator. Please refer to the documentation here for detailed instructions.
Reference
Increase Partitions in Bottomless Database
We have a full step-by-step guide for expanding your cluster by adding more leaves you can follow:
{answer}