0

can I have same databases connected to two different proxysql configuration?

1

Yes, I would think so. In the ProxySQL blog post here there is a reference infrastructure which has multiple ProxySQL instances connected to the same set of database nodes. It also says:

We usually recommend to setup ProxySQL instances on the application boxes for availability reasons

That said, for a Galera cluster, I'm unsure whether the ProxySQL instances agree between themselves which Galera node is the "master" and which are the "slaves" - this is especially relevant if you're using read-write splitting, which is something you may want to do with a Galera cluster in order to avoid certain deadlocks not seen with ordinary MySQL configurations. (See also: Galera’s big gotcha for MySQL users.)

1

I have upvoted the other answer, and normally I would not send a different one, but I would like to complement with extra information:

  • Yes, you can do that and it is even a very typical setup, for example to have reads go to one service and write through other, or any other split you want.
  • The problem with more than one proxysql is that you want to keep its configuration in sync in terms of database awareness- that is not easy, and you may need to setup a separate service for that to avoid different views of your cluster in case of a network split, etc. Many large setups handle that with some high available, consensus-based configuration management service. E.g.: https://github.blog/2018-06-20-mysql-high-availability-at-github/

Not the answer you're looking for? Browse other questions tagged or ask your own question.