ProxySQL is a great tool. It’s one of the most recommended technologies in our Open Source Database practice.
Many of our clients are running it or are migrating towards it, but we’ve seen that it is pretty CPU-intensive. We’ve also seen strange behavior in the connection handling when reaching the CPU saturation point.
At this point, we noticed that the frontend_connections counter in the stats_mysql_users table was not decreasing even after the connections were no longer present at the network level. This counter is used to check the max_connections value in the mysql_users configuration table, causing frontend connections to receive a “Too many connections” error. So we determined that the key element here is to scale it properly. Obviously, all the major cloud providers can help us here as they all have features like auto-scaling groups.
Jervin Real of Percona has recently …[Read more]