Redis vs MySQL at scale: why Shopify moved inventory to MySQL

Published 2026-10-19 · Built only from first-party engineering write-ups in our database. Every number below comes from the linked source.

Shopify's 2026 post is the direct comparison: it moved checkout inventory reservations from Redis to MySQL, using one row per sellable unit, a bounded pool of 1,000 rows per item and location, and SELECT ... FOR UPDATE SKIP LOCKED. The real ceiling turned out to be connections held by other checkout code. Elsewhere Redis plays supporting roles: Stripe's rate limiters and Stack Overflow's caching.

Redis vs MySQL: side by side

RedisMySQL
Stories in our database511
CompaniesFigma, OpenAI, Shopify, Stack Overflow and StripeCanva, Cloudflare, GitHub, Meta, PlanetScale, Shopify and Slack
Published2016–20262013–2026
Techniques alongside itcaching (1), connection pooling (1), control plane (1), database migration (1)caching (3), database migration (3), horizontal sharding (3), connection pooling (2)
Scale numbers stated in sourcestens of thousands of sandboxes across products (Figma); $5.1 million sales/minute (Black Friday 2025 peak) (Shopify); 900 million+ weekly active users (OpenAI)99.99% production availability target (Cloudflare); hundreds of millions of users (Canva); $5.1 million sales/minute (Black Friday 2025 peak) (Shopify)
Direct comparison storyShopify: We replaced Redis with MySQL for inventory reservations—and it scaled(same story)

Verdict

Redis keeps showing up for caching and rate limiting. Shopify's post shows a relational database can also take a hot, contended workload when the schema and locking are designed for it.

Counts are stories in How They Scaled tagged with each side, see the Redis and MySQL pages. They describe what these teams wrote about, not market share or benchmark results.

The direct comparison

Redis in other scaling stories

Figma · 2026

How Figma manages sandboxes at scale

Figma's AI products needed secure places to run untrusted code, so the team built Nimbus, a centralized sandbox platform that product teams call through a simple namespace config and GetOrCreate/Get/Delete APIs. Nimbus picks a cloud provider, applies networking and security policies (trusted-host allowlists plus read-only GET/HEAD/OPTIONS to the rest of the internet, credentials decrypted only on the way out to their intended destination), and runs sandboxd inside each box for process supervision and metrics. Warm pools of already-running sandboxes cut provisioning latency by about 90% versus cold starts, raised availability from 99% to 99.95%, and absorb minutes of provider outages while Postgres claim transactions and a Redis health-check queue keep the pool correctly sized and singly assigned.

tens of thousands of sandboxes across productswarm pools cut provisioning latency ~90%warm poolsmulti-provider failovernetwork policy isolationNimbusPostgresRedis
OpenAI · 2026

How OpenAI delivers low-latency voice AI at scale

OpenAI rebuilt its WebRTC stack for ChatGPT voice and the Realtime API after one-port-per-session media termination collided with Kubernetes: large public UDP ranges, sticky ICE/DTLS ownership, and global first-hop latency. A lightweight Go relay exposes a small fixed UDP surface, reads ICE ufrag routing hints from the first STUN packet, and forwards opaque media to the transceiver that owns ICE, DTLS, and SRTP state (with Redis-backed recovery). Cloudflare geo and proximity steering place signaling near users while Global Relay shortens the first media hop, preserving standard WebRTC for clients without making inference backends WebRTC peers.

900 million+ weekly active usersWebRTC relay + transceiverICE ufrag routinggeo-steered signalingWebRTCPionGo
Stripe · 2017

Scaling your API with rate limiters

The four kinds of rate limiters and load shedders Stripe uses to protect its API.

rate limitingload sheddingRedis
Stack Overflow · 2016

Stack Overflow: The Architecture - 2016 Edition

A tour of how Stack Overflow serves a huge site from a small number of powerful servers with heavy caching.

vertical scalingcachingSQL Server.NETRedis

MySQL in other scaling stories

Cloudflare · 2026

Inside Hyperdrive: How we solved a rare Hyperdrive MySQL caching bug

Hyperdrive, Cloudflare's distributed connection pooler for Workers, keeps warm database connections on its network and can cache common query results in the CDN cache. Taking its MySQL support from beta to GA meant finding bugs like utf8 being a 3-byte alias (fixed with utf8mb4) and COM_RESET_CONNECTION silently resetting the charset to the server default. The hardest was an empty-result bug seen by the highest-volume MySQL customer in about 0.001% of queries, only with caching on. Each Hyperdrive instance has a Client node next to the Worker and an Endpoint node near the database, and they share a cache when they run in the same data center. Because drivers like Node's mysql2 don't support CLIENT_DEPRECATE_EOF, the Client rewrites results into the Worker's capabilities, so the two nodes were caching different bytes for the same query and could read each other's entries. Caching one canonical encoding no matter which node stores it fixed the bug, and Client connection success reached 99.99%.

99.99% production availability targetbug hit ~0.001% of queriesconnection poolingcachingprotocol translationMySQLWorkersHyperdrive
Canva · 2026

Session revocations at scale

Canva keeps 12 hours of session revocations in memory on every gateway, but hundreds of pods each loading over a million revocations from MySQL on deploy caused a stampede on the database. A worker now packs revocations into sorted 16-byte records in 30-minute chunks on S3, using conditional PUTs for optimistic concurrency and ZooKeeper leader election to avoid conflicts, and reaches over 2,000 revocations per second. Gateways binary-search the downloaded bytes directly and poll with conditional GETs, which shrank the cache by 87.5% and cut the revocation database down to two read replicas kept for redundancy.

hundreds of millions of usershundreds of thousands of session checks/seccachingobject storageoptimistic concurrency controlMySQLAmazon S3ZooKeeper
Shopify · 2024

Horizontally scaling the Rails backend of Shop app with Vitess

Shopify's Shop app adopted Vitess to shard its Rails backend, covering keyspace design and the migration plan.

horizontal shardingdatabase migrationMySQLVitessRuby on Rails
GitHub · 2023

Upgrading GitHub.com to MySQL 8.0

How GitHub upgraded its whole MySQL fleet to 8.0 with staged replicas and a working rollback path.

5.5 million QPS300+ TBfleet upgradereplicationrollback planningMySQL
PlanetScale · 2022

One million queries per second with MySQL

PlanetScale benchmarked a horizontally sharded Vitess cluster up to one million QPS.

1 million QPShorizontal shardingbenchmarkingMySQLVitess
GitHub · 2021

Partitioning GitHub's relational databases to handle scale

GitHub defined schema domains and linted cross-domain queries so it could move table groups onto separate MySQL clusters.

vertical partitioningschema domainsonline migrationMySQLRuby on RailsVitess
Shopify · 2021

Shard Balancing: Moving Shops Confidently with Zero-Downtime at Terabyte-scale

Shopify rebalances MySQL shards by moving individual shops online with its Ghostferry tool.

terabyte scaleshard rebalancingonline migrationzero downtimeMySQLGhostferry
Shopify · 2021

Read Consistency with Database Replicas

Shopify routes reads to MySQL replicas while giving apps consistency guarantees such as monotonic reads.

read replicasconsistencyMySQL
Slack · 2020

Scaling Datastores at Slack with Vitess

Slack's multi-year migration from active-active MySQL pairs to Vitess, so data could be sharded by any key, not only workspace.

2.3 million QPShorizontal shardingdatabase migrationMySQLVitess
Meta · 2013

TAO: The power of the graph

TAO is Facebook's geo-distributed graph cache over sharded MySQL, serving the social graph at more than a billion reads per second.

over 1 billion reads/secmillions of writes/seccachinggeo-distributiongraph data modelMySQLMemcache

FAQ

Why did Shopify replace Redis with MySQL?

Shopify's post explains how it moved inventory reservations to MySQL with one row per sellable unit and SKIP LOCKED, and reports that the cleanup removed 50% of reads and 33% of transactions on the primary. The post cites a Black Friday 2025 peak of $5.1 million in sales per minute.

What is Redis used for at scale?

In our database: Stripe's API rate limiters and load shedders, and caching at Stack Overflow.

The best scaling write-ups, weekly

One email a week. No spam.

More comparisons

All comparisons →