Shopify replaced Redis with MySQL for inventory reservations–and it scaled

Shopify successfully migrated its inventory reservation system from Redis to MySQL by utilizing the SKIP LOCKED feature. This transition allowed the platform to handle massive transaction volumes during peak events like Black Friday without overselling.
Why it matters
It provides a blueprint for high-scale database architecture, proving that relational databases can outperform specialized key-value stores under specific high-contention conditions.
How we used SKIP LOCKED, composite primary keys, and connection visibility to hit our scale targets.
During checkout, when a buyer clicks "Complete purchase," we need to guarantee the items they're buying are still available. If we get this wrong in one direction, two buyers purchase the same last unit: the merchant has to cancel an order, send an apology email, and eat the support cost. If we get it wrong in the other direction, we tell a buyer something is sold out when it isn't, and the merchant loses a sale they should have made.
At Shopify's scale, either failure compounds fast. On Black Friday 2025, merchants on our platform hit a record $5.1 million in sales per minute at peak. Every one of those transactions touches inventory.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in