Web Apps with Galera Cluster, Setup Configuration

I thought I would post this on the forums since it is out of the scope of the (amazing) guide you posted on galera clusters. Thank you for responding to my question. I’m just having trouble figuring this out.

Right now, I have a total of 4 servers. One with the original site and database, apache, php, wordpress and other apps. I setup 3 additional servers to create the Galera cluster, which is working and in sync, replicating.

What I was trying to do was essentially access one of the nodes of the Galera cluster in the wp-config.php figuring if it wrote to one, it would replicate across all. But, I think that’s wrong because I can’t get it working.

You mentioned what I think is to use 3 servers instead of 4, and have the same webserver setup on all of them. (I think). Then use dns proxy to distribute across all of them.

Where can I find documentation on this. I’ve searched up and down - but I think its obvious I don’t fully understand what’s going on to search with the right terminology.

Any help is much appreciated. Thank you,

Dylan

You should always use an odd number of nodes in Galera cluster. The minimum is 3.

DNS balancing is very simple. Just create 3 DNS A records for the same hostname.

I was looking for a complicated solution to this when in fact it is pretty simple. Makes complete sense though. Your response is much appreciated. :).