Deploy on multiple availability zones (AZ)¶
During the deployment to hardware/VMs, it is important to spread all the database copies (Juju units) to different hardware servers, or even better, to different availability zones (AZ). This will guarantee no shared service-critical components across the database cluster (eliminate the case with all eggs in the same basket).
Prerequisites¶
Machines: This feature is enabled by default on EC2/GCE and is supported by LXD/MicroCloud.
Kubernetes: Your cloud must support and provide availability zones concepts such as the K8s label topology.kubernetes.io/zone. This is enabled by default on EKS/GKE/AKS and supported by MicroK8s/Charmed Kubernetes.
Examples¶
These guides will take you through deploying a MySQL cluster on Google Cloud using 3 available zones. All Juju units (or pods, on Kubernetes) will be set up to sit in their dedicated zones only, which effectively guarantees database copy survival across all available availability zones.