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.