Manual Scale-Out
OneDB supports manual scale out for the OneDB server and the OneDB Connection Manager.
For the OneDB Server to scale out the number of servers manually set the his is accomplished by set the helm parameter onedb.serverReplicaCount.
For the OneDB Connection manager to scale out the number of connection managers manually set the his is accomplished by set the helm parameter onedbcm.cmReplicaCount.
Manual Scale out of Connection Manager
helm upgrade onedb-v1 –set onedbcm.cmReplicaCount=3 –f myvalues.yaml onedb-product
The pods for the connection manager are onedbcm-0, onedbcm-1, onedbcm-2, and so on.
Automatic Scale-out
The OneDB SQL Data store uses the kubernetes resource Horizontal Pod Autoscaler (HPA) to control how scaling will occur automatically. For more information on HPA refer to the kubernetes documentation here: (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale).
Auto-scale is based on CPU usage and this is disabled by default. To enable auto-scaling set the autoscale.enabled helm chart parameter to true and set autoscale.targetCPUUtilizationPercentage to a percentage value where you want scaling to occur.
NAME | REFERENCE | TARGETS | MINPODS | MAXPODS | REPLICAS | AGE |
---|---|---|---|---|---|---|
onedb-c5abcd-hpa | StatefulSet/onedb-server | 8%/90% | 2 | 10 | 2 | 3h34m |
onedbcm-c5abcd-hpa | StatefulSet/onedbcm | 5%/90% | 2 | 10 | 2 | 3h34m |
In the above output the onedb-c5abcd-hpa is for the OneDB server and onedbcm-c5abcd-hpa is for the Connection Manager. The CPU threshold is set to 90% for each and we see minimum pods is set to 2 with maximum set to 10. Currently there are 2 of each.