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.