Data Store Selection and Usage
We replaced Redis with MySQL for inventory reservations—and it scaled (2026) - Shopify

We replaced Redis with MySQL for inventory reservations—and it scaled (2026) - Shopify

5/12/2026

What this post added

This post details the migration of Shopify's inventory reservation system from Redis to MySQL. Key technical contributions include: implementing a one-row-per-unit design in MySQL, utilizing `SKIP LOCKED` for concurrent reservations, establishing a bounded pool of 1,000 reservation units per item/location to manage contention and query performance, switching transaction isolation to `READ COMMITTED` to avoid gap locks during replenishment, standardizing lock acquisition order between reserve and claim operations to prevent deadlocks, and batching reservation queries using `UNION ALL` for reduced round trips. The post also highlights the discovery of connection exhaustion as the primary bottleneck, addressed by implementing per-caller connection usage tagging and aggregation, and optimizing MySQL configuration (InnoDB thread concurrency).

Read the original post ↗