Percona XtraDB HA Cluster


For an infrastructure, I have a database structure consisting of 5 nodes, which I position as 3 nodes DC1 and 2 nodes DC2 in 2 different datacenters. However, if DC1 is disabled, the database may become cluster down. In this case, what kind of structure should I set up? Is there any documentation to help with installation?


Yes, this is expected because you’ve lost majority in DC2 if DC1 goes down. When this happens, if you know DC1 will be down for an extended period, you can force DC2 to become PRIMARY by using SET GLOBAL wsrep_provider_options=pc.bootstrap=1 and this will force DC2 to restart the cluster.

The other, more typical option, is to create a 3rd node in DC2, and run two independent clusters. You would then configure async replication between node1.dc1 and node3.dc2 (as example). If DC1 goes offline, DC2 still has its own PRIMARY cluster of 3 nodes.