galera cluster across multiple dc's
We are implementing a cross-site Galera cluster.
I am a bit confused from docs regarding the number of nodes: does the total nodes need to be an odd number or nodes per site need to be odd?
We want to have 2 nodes per site, but will add a garb node to make it odd to avoid split scenario if needed.
Total nodes (across sites) need to be an odd number. Let's say if you have A,B,C as the sites. If you have 2 sites, A holds primary status where garbd is located and B holds the secondary. Both sites are master and sync up until site A goes down. If site A is down, site B won't work unless you rebootstrap the cluster on B.
If you have 3 sites, place the garbd in C so A and B are master and hold the primary status. If any of A or B goes down, either site can still serve as a master since site C is there as the arbitrator.
Take a look at this blog post for more examples:
In fact, the connectivity is not very good between the 2 sites. This is the reason we were initially considering 2 separate galera clusters with mysql multi-master replication between them. but we ran into other issues with this glue approach so we chose just deploy one galera cluster across the 2 sites.
What would you recommend as the best solution?
Thank you for your help!
Please sign in to leave a comment.