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

261 points · 167 comments on HN · read original →

Points and comments are a snapshot, not live.

Shopify moved inventory reservations from Redis to MySQL using SKIP LOCKED, meeting peak traffic targets.

Shopify rebuilt its oversell protection system, replacing Redis with MySQL for inventory reservations during checkout. The solution uses one row per sellable unit, capped at 1,000 per item/location, with a replenishment pool. MySQL 8's SKIP LOCKED feature and a composite primary key reduced contention. The real bottleneck was connection exhaustion from other checkout processes, not database queries. Cleanup removed 50% of reads and 33% of transactions on the primary. The cutover ran both systems in parallel (shadow mode) before switching. During Black Friday 2025 peak, $5.1M in sales per minute were processed.

What commenters are saying

Commenters split on the article's value. Several noted the post appears AI-generated, with one calling it 'pure vibeslop' and criticizing the lack of human engineering insight. Others found the explanation of MySQL's SKIP LOCKED and connection bottlenecks useful. A critic argued Redis remains 'insanely awesome' for reservations and questioned the need to abandon it. Criticism of Shopify's leadership appeared, with comments about far-right funding and workplace culture, including allegations of slurs and vaping. Some defended the database approach while disliking the AI prose.