Magento reads far more than it writes
Every page bootstrap fires a burst of queries, and browsing traffic dwarfs cart and checkout. The read load grows with every shopper, long before writes do.
Add application servers and a Magento store still stops at the same place: the database. ProxySQL sits between your store and its database, pooling connections, caching repeated queries, and routing selected reads to a replica, so the primary keeps its capacity for checkout.
Plays from YouTube when you press play. Watch on YouTube
Meet Magento Florida 2026 · 27 min
Pradip Shah, co-founder of luroConnect, on the technical track: what we run in front of the database on our busiest stores, and where it stops helping.
Why the database
Every page bootstrap fires a burst of queries, and browsing traffic dwarfs cart and checkout. The read load grows with every shopper, long before writes do.
Transactions that stay open while PHP code runs, and locking reads, hold rows while everything else queues behind them. A busier database is a slower one.
Popular high-availability plans balance load across application servers, not database servers. You get a standby if a node fails; you don’t get more database.
What ProxySQL does
Magento connects to ProxySQL as if it were the database. Every query passes through its rules, which can pool, cache or route it.
Connection pooling
MySQL and MariaDB run one thread per connection, so hundreds of PHP workers mean hundreds of threads for the operating system to schedule. ProxySQL multiplexes them onto a small pool of reused connections.
Query caching
Rules can hold the result of a matching query for a set number of milliseconds, so a storm of identical catalog reads becomes one.
Query routing
Queries that are safe to answer from a copy can be routed to a read-only replica, so the primary keeps its capacity for checkout and writes.
Four ways to scale reads
ProxySQL can sit in front of a Galera cluster or a primary with replicas. Each layout trades something away.
| Layout | What you get | The catch |
|---|---|---|
| Galera cluster, every query load-balanced | True load balancing and good read performance. | Expensive and complex: at least three nodes, then five, seven. Writes get slower because every node must agree. |
| Galera cluster, reads balanced, writes to one node | Better write performance. | Gives up the high availability you bought the cluster for. |
| Primary + replica, automatic read/write split | Built into ProxySQL; one setting. | A read straight after a write can land on a replica that hasn’t caught up yet. For a store, that race makes it a non-starter. |
| Primary + replica, selected reads routed What we run | Chosen reads go to the replica; writes and everything else stay on the primary. | Slow to set up: rules are written per store, from its own query statistics. |
How we choose
ProxySQL records statistics for every normalised query. We read those for your store and write rules from them:
Each database server keeps its own query cache, so routing reads gives the store caches that work in parallel. In our experience, adding CPU by sending queries to a replica gives more throughput than adding the same CPU to the primary.
Not all roses
A proxy is an extra hop. Without the concurrency to pay for it, a not-so-busy store loses a little speed. That is why ProxySQL sits in the High Traffic band, not every plan.
If the replica falls behind the primary, the routing rules come off and its queries go back to the primary until it catches up.
ProxySQL keeps settings in three places (config file, runtime, on-disk store), and each table has its own load and save commands.
The same query can fingerprint differently across database versions, so rules are rechecked when the database is upgraded.
Writing rules by hand is slow, careful work. We are building tooling to make it declarative: rules kept as a file, compared against what is live and applied automatically, with query statistics used to suggest candidates.
No. ProxySQL speaks the MySQL protocol, so the store connects to it exactly as it would to the database. The change is one connection setting, made by us.
No. An automatic read/write split is unsafe for Magento, because a read straight after a write can reach a replica that has not caught up. We route only queries we have selected from your store’s own statistics; writes, cart, checkout and order data stay on the primary.
No. On a quiet store the extra hop costs more than pooling saves. It earns its keep under concurrency: sale days, campaigns, heavy catalog browsing. It is part of the High Traffic band and available as an add-on elsewhere.
Yes. ProxySQL sits in front of either, and in front of a single server, a primary with replicas, or a Galera cluster.
The routing rules come off and those queries go back to the primary until the replica catches up. Shoppers see the primary’s answer, never a stale one.
No. Connection pooling and query caching work against a single database server. Routing reads needs a replica, which is a separate add-on.
ProxySQL is part of the High Traffic band and an add-on in the others. Your store runs in your own AWS or GCP account. Tell us about your peak and we’ll tell you honestly whether ProxySQL would help.