I still don't have much experience using these tools (Galera Cluster and MySQL Master-Slave Cluster ) and I'm testing some scenarios in my Wordpress environment at Jelastic/Virtuozzo.
My platform has a large volume of queries per minute, both from requests that happen randomly, and from actions via Cron, which in my case does not use the native wp-cron schedule, but the linux cron schedule, every 5 minutes .
I use applications that access the database a lot, such as Woocommerce, Wocoomerce Subscriptions, Learndash, Automator, among others.
Testing scenario 1 - MySQL Master-Slave with ProxySQL: it was satisfactory, but I'm afraid to keep only one node as a master, in case of failure.
Testing scenario 2 - MySQL Master-Master with ProxySQL: it worked for some time, but then it started to have problems with out of sync queries in some tables, mainly the options table (wp_options). The error 'ha_err_key_not_found' became common in the log.
Testing scenario 3 - MariaDB Galera Cluster without ProxySQL: This is the default configuration in the Wordpress Cluster on the Jelastic Marketplace. It was satisfactory, but at times it produced [Warning] Aborted connection 6388 to db:.. (Got an error writing communication packets). And this was a nuisance, as it always happened in some Woocommerce task requests, scheduled in Action Sheduler, causing these tasks to fail.
Testing scenario 4 - Maria DB Galera Cluster with ProxySQL: It was also satisfactory, there were fewer task errors in Action Sheduler, but not completely.
About such errors in Action Sheduler, in the last two scenarios, they were always the same: "action timeout after 300 seconds", although the server timeout is greater than this time (600). Which leads to believe that the task was simply killed. And these only happened when the action was triggered via asynchronous request.
All this illustration was just to report my experiences, but I realize that, despite some flaws, using Galera Cluster for me is the best option. But my doubts arise:
1) Is it better to use ProxySQL in a Wordpress environment or not?
2) If I don't use ProxySQL on the Galera Cluster, I know that replication will work normally, but if I connect Wordpress directly to the master node, will the queries be balanced between the other Galera nodes? Or will queries always be performed on the Master node, regardless of whether they are written or read?
3) If the answer to question 2 is that the queries will not be balanced, would it be correct to connect each node of the app server layer to a different Galera node?
4) In the case of using MySQL Master-Salave without ProxySQL, would SELECT queries still be performed on the slave node? Or is only the master node actually responding?
Thank you in advance for the possible answers and I apologize if it was not clear or if the question is a little too naive.