In this blog post we are going to take a closer look at ProxySQL rules. How do they work, and how big is the performance impact of having many rules?
I would like to say thank you to Renè, who was willing to answer all my questions during my tests.
Overview
ProxySQL is heavily based on the query rules. We can set up ProxySQL without rules based only on the host groups, but if we want read/write splitting or sharding (or anything else) we need rules.
ProxySQL knows the SQL protocol and language, so we can easily create rules based on username, schema name and even on the query itself. We can write regular expressions that match the query digest. Let me show you an example:
insert into mysql_query_rules …[Read more]