I'm having a Galera Mysql cluster and ProxySQL on top of this cluster. ProxySQL has connection pool mechanism itself.
My question is, should I apply connection pool on application (.net, springboot,...) along with ProxySQL's connection pool ? And what is the recommendation for this ?
Thank you.
Depends on your application architecture (monolith or Microservices) and the number of databases servers you have. From my experience you don't need too.
ProxySQL opens a pool of connections to the backend servers. It is not 1-to-1 mapping, by default it tries to reuse one backend connection for as many frontend connections as possible. This is called connection multiplexing.
ProxySQL can handle N frontend connections and M backend connections, where N > M (even N thousands times bigger than M).
You can refer to this old conversation by ProxySQL creator or its documentation on multiplexing.
Also, check out this article on connection handling & throttling with ProxySQL. (Disclosure: I am affiliated with this site.)