# Dynamic ProxySQL Query Rules

DevFeed: [Dynamic ProxySQL Query Rules](<https://devfeed.tech/articles/dynamic-proxysql-query-rules-1376.md>)

Original publisher: [Read original article](<https://shopify.engineering/dynamic-proxysql-query-rules>)

Author: Rahul Rangith

Published: 2021-04-20T19:00:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Shopify](<https://devfeed.tech/topics/shopify.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [incident](<https://devfeed.tech/topics/incident.md>), [servers](<https://devfeed.tech/topics/servers.md>)

Tags: [databases](<https://devfeed.tech/tags/databases.md>), [errors](<https://devfeed.tech/tags/errors.md>), [incident](<https://devfeed.tech/tags/incident.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [performance](<https://devfeed.tech/tags/performance.md>), [scale](<https://devfeed.tech/tags/scale.md>), [shopify](<https://devfeed.tech/tags/shopify.md>), [tool](<https://devfeed.tech/tags/tool.md>)

## AI overview

Shopify describes a tool for deploying ProxySQL query rules safely and at scale across thousands of instances. The rules can reroute, rewrite, or reject MySQL queries to help address database overload, faulty code, and incident-related issues.

## Source excerpt

ProxySQL comes with a powerful feature called query rules. The main use of these rules at Shopify is to reroute, rewrite, or reject queries matching a specified regex. However, with great power comes great responsibility. These rules are powerful and can have unexpected consequences if used incorrectly. At Shopify's scale, we're running thousands of ProxySQL instances, so applying query rules to each one is a painful and time consuming process, especially during an incident. We've built a tool to help us address these challenges and make deploying new rules safe and scalable.