I'm using Galera with HAProxy in an attempt to keep an ancient php application as available as possible. I've run across a scenario that if WSREP is not ready on a node, instead of the php application and haproxy trying a different node, it just fails and the user experiences errors. Ideally, if the node isn't fully ready, I'd like HAProxy to direct queries to a different node that is ready. For some reason I just can't get it to work right.
Two ways I can see this being fixed. I'm just not experienced enough with Galera to figure this out:
- If Galera is not fully ready, mariadb should not accept any connections
- If Galera is not fully ready, HAProxy should know it and set the server as down.
Here is my mariadb config:
https://gist.github.com/erichowey/b88795e19a68d174dddf55383e488919Here is my HAProxy config:
https://gist.github.com/erichowey/6a9fe7022cb6ad6d71208454ca57e136And here is what error the PHP app is throwing:
https://gist.github.com/erichowey/b4c31f89dd7832e5e7a8c55b1f67497dThank You!