Proxysql for multiple galera cluster

Currently we use proxysql to connect to galera cluster. Since we have many galera cluster and many microservice can we configure or use 1 proxysql to connect to several galera cluster?

How should we configure cluster proxysql for each galera cluster? Do we put each galera cluster in its own hostgroup? or we put all cluster into the same hostgroup and galera will route based on database/schema used?
For more information we use percona xtradb cluster. And we also use percona proxysql-admin script for managing proxysql.

Much appreciated for the response.

Howdy harto,

Ideally you should have a ProxySQL instance or ProxySQL cluster per Galera cluster. There’s a few different topologies you can use, but the two most common are to put ProxySQL standalone in front of your database cluster and configure appropriate hostgroups and have all of your application instances connect to that ProxySQL. Another method is to have ProxySQL running correctly configured on each application server and the application server connects locally to its own ProxySQL instance which manages traffic for the database cluster.

There’s a lot of information on the Percona Blog and in the ProxySQL documentation about both of these configuration options. I think I addressed in broad strokes most of what was in your question, I hope this helps.

Thanks