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

The onedbcm.cmReplicaCount helm chart parameter can be changed at any time with the helm upgrade command. You can increase or decrease the number of connection managers in the HA cluster by changing this value.
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.

The minimum pods for auto scaling would be the helm chart parameter onedb.serverReplicaCount for the OneDB Server and onedbcm.cmReplicaCount for the Connection manager. The maximum pods for auto scaling would be the onedb.maxReplicaCount helm chart parameter.
Important: When enabling auto scaling OneDB Server and Connection Manager resources should be explicitly configured. See onedb.resources and onedbcm.resources helm chart parameters.
Following table shows the HPA resource in kubernetes:
Table 1. $ kubectl get hpa Output
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.