Hey, You pretty much can not do this kind of setup with HAProxy, as HAProxy can balance MySQL only on L4, while for spreading reads/writes you need more of L7 balancer. With MariaDB specifically, I'd suggest checking on MaxScale - but keep in mind, that it has a BSL license right now. So it's not _really_ opensource project. Also, you can check on ProxySQL, which does understand Galera clustering as well, and can balance requests accordingly as well. вт, 18 февр. 2025 г. в 15:23, Mia <mikasa.ack1618@gmail.com>:
Hi OpenStack community,
I'm currently working on read/write database splitting in my OpenStack environment using this document: https://docs.openstack.org/large-scale/journey/configure/database.html#rever...
Here is what I've done up to this point:
- Configured HAProxy as recommended
- Added the slave_connection parameter to all service configurations(nova.conf, cinder.conf, etc.)
To test this, I enabled MariaDB's general_log on all nodes. However, upon checking the logs, most SELECT queries still reach the first database node instead of the other replicas.
Did I miss a configuration step somewhere?
Any guidance would be super helpful.