Best practice for percona cluster to connect with the app

Hello all,

I have a percona cluster of 3 and I am also using ProxySQL for monitoring the clusters. My apps are connecting to one of the cluster nodes which was bootstrapped and the data gets written to all the other nodes because I have write enabled to all three nodes. Should I connect the apps to ProxySQL instead of connecting to one of the node in the cluster? If I do that if my ProxySQL goes down my cluster will stop working.
Please let me know what will be the best practice.

Thanks,
Rushita

Hi, you should connect via proxysql since you implemented it. Either install it locally on every app server or set up a a few instances behind a load balancer. Here are some examples of the latter: Consul, ProxySQL and MySQL HA

Hello Ivan, thank you for the response. I have installed proxysql in a separate server. what should I be doing in this case?

@RSub Since you have proxysql installed, your applications should now be connecting to proxysql, not the cluster. All traffic will now go like this “app → proxysql → backend pxc”

1 Like