0

I'm looking for some guidance on whether ProxySQL is suitable as a method of failing over Java connection pool based apps in a multi-master replication (with read/write split) set up?

I've found little online to suggest that ProxySQL either does or doesn't play nicely with Java apps which rely on reusable persistent connections via connection pooling (in this case HikariCP), but some anecdotal reports suggested that ProxySQL won't failover existing connections in the case of the 'master' (writer) node being down without the connections being closed and reopened on the app side.

This would make sense if ProxySQL were doing a 1-to-1 passthrough, but surely with its multiplexing features, connections could be intelligently routed to another host?

  • Keep in mind that there are several "proxy" tools available. – Rick James Jan 13 at 22:39
  • @RickJames I see MaxScale and HAProxy mentioned a lot, but ProxySQL seems to be the favourite in Percona-land. Open to using whatever gets the job done, was just looking for some clarification on ProxySQL. – Hexodus Jan 13 at 23:20
  • If you have to ability to I would say test the functionality. I use proxy sql for read Replicas and I know with that the application is connecting to proxy sql and proxy sql is relaying data back and forth as it is MySQL aware so if the connection to one of the back end servers is terminated the next command with go to the next server in the group without having to close and reopen the connection at the application layer. However just like any other disruption in connection in flight requests will fail and not automatically get retried. – Aaron Jan 14 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.