How to Scale ScalarDB
This guide explains how to scale ScalarDB.
You might be able to resolve some performance issues by scaling ScalarDB Cluster if a bottleneck exists on the ScalarDB Cluster side. However, sometimes a performance issue is caused by a bottleneck in the backend databases. In such cases, scaling ScalarDB Cluster will not resolve the performance issue.
Instead, please check where the bottleneck exists. If the bottleneck exists in the backend databases, consider scaling the backend databases.
- ScalarDB Cluster (Enterprise edition)
- ScalarDB Core library (Community edition)
Select your preferred tool for scaling ScalarDB Cluster.
- Using Scalar Helm Chart (recommended)
- Using kubectl
If you use Scalar Helm Chart to deploy ScalarDB Cluster, you can scale your ScalarDB Cluster deployment as follows:
-
Add the following to your custom values file, replacing
<NUMBER_OF_PODS>
with the number of pods you want to scale:scalardbCluster:
replicaCount: <NUMBER_OF_PODS> -
Upgrade your ScalarDB Cluster deployment by running the following
helm upgrade
command, which uses the updated custom values file. Be sure to replace the contents in the angle brackets as described:helm upgrade <RELEASE_NAME> scalar-labs/scalardb-cluster -n <NAMESPACE> -f /<PATH_TO_YOUR_CUSTOM_VALUES_FILE_FOR_SCALARDB_CLUSTER> --version <CHART_VERSION>
If you deploy ScalarDB Cluster in a Kubernetes environment, you can temporarily scale your ScalarDB Cluster deployment by using the kubectl scale
command.
- Run the following
kubectl scale
command, replacing the contents in the angle brackets as described:
kubectl scale --replicas=<NUMBER_OF_PODS> deployment/<DEPLOYMENT_RESOURCE_NAME_OF_SCALARDB_CLUSTER>
Scale ScalarDB Core
ScalarDB Core is provided as a Java library. So, when you scale your application, ScalarDB scales with your application.