High Availability

When deploying the OneDB SQL Data Store helm chart or one of the charts that includes this as a subchart the default behavior is that you will get an HA cluster with a primary and secondary server. The primary server will be running in onedb-server-0 pod and the updatable HDR secondary will be running in onedb-server-1 pod. HDR replication is configured to use NEAR_SYNC replication mode to avoid data loss.

The OneDB database server cluster is deployed using onedb-server statefulset. There will be a second statefulset onedbcm deployed using two connection manager pods, onedbcm-0 and onedbcm-1.

The connection manager SLA definitions are configured to use ROUNDROBIN policy. This can be changed to WORKLOAD by setting the onedbcm.sla_policy helm parameter.

Note: OneDB current primary server pod name details are saved using annotations on a ConfigMap <Helm Release.name>-onedb-clusterinfo. Pod restart logic looks up annotation details on this configmap to decide whether to start OneDB server as primary or HDR secondary server. Command helm uninstall does not delete this configmap as helm install command could re-use content from the existing configmap, if OneDB server pods are restarted using pre-existing PVCs.