HeadlinesBriefing favicon HeadlinesBriefing.com

Shopify Replaces Redis with MySQL for Inventory Scaling (2026)

Hacker News •
×

Shopify replaced Redis with MySQL to handle inventory reservations during peak traffic like Black Friday 2025. The shift aimed to unify reservations and inventory ledgers in one database for ACID guarantees. The previous Redis model had limitations: separate systems risked overselling/underselling, and lacked multi-location awareness.

The solution centered on MySQL 8's SKIP LOCKED feature. By storing one row per inventory unit (instead of quantity per item), reservations could be atomic. A bounded pool of 1,000 rows per item/location ensured scalability, replenishing dynamically during high demand. This avoided table bloat while maintaining query speed.

Key technical choices included a composite primary key (reducing locks), READ COMMITTED isolation level (preventing deadlocks), and standardized lock ordering. These addressed contention issues and ensured correctness. The system now handles Shopify's 14% U.S. ecommerce market share with 11% higher sales per minute on Black Friday 2025 compared to prior years.

The shift eliminated Redis' operational overhead and failure modes. It prioritized speed and accuracy, critical for flash sales. The lesson learned was that unobserved bottlenecks—like lock contention—often drive scalability challenges more than raw metrics.