We replaced Redis with MySQL for inventory reservations—and it scaled
Shopify moved checkout inventory reservations from Redis to MySQL by modeling one row per sellable unit and using SELECT ...
Shopify moved checkout inventory reservations from Redis to MySQL by modeling one row per sellable unit and using SELECT ...
Concurrent batch upserts into an InnoDB table keyed by a sequential id can deadlock even when processes touch different rows, because the gap locks taken on unique-key collisions span neighbouring index entries that other processes also need.
Shop app outgrew a single MySQL database despite federating tables across databases, so the team moved its Rails backend to Vitess, sharding user-owned tables by user_id into a "users" keyspace and keeping the rest in an unsharded "global" keyspace.
Adding a NOT NULL column through LHM's shadow-table migration (new table, replication triggers, batched copy, rename) can break writes or silently lose data depending on the DEFAULT clause, an added UNIQUE INDEX and the MySQL SQL mode.
Shopify moved hundreds of horizontally sharded Percona Server shards, thousands of VMs in all, from 5.7.21 to 5.7.32, mainly to get writeset-based replication parallelism across replication topologies up to four hops deep.
Slow MySQL Pod startup and degraded query performance on long-running GKE nodes in Shopify's KateSQL platform traced back to a Linux kernel memory cgroup leak: roughly 50K zombie memory cgroups made mem_cgroup_commit_charge slow, so each 128MB mmap during InnoDB buffer pool initialization took about 100 ms. The investigation used strace, perf flamegraphs, slabtop and /proc/cgroups, and Google kernel engineers confirmed it as a side effect of slab reparenting on cgroup removal.
Shopify rebalances its MySQL shards by moving individual shops between pods online, with downtime confined to a brief cutover.
Shopify runs thousands of ProxySQL instances in front of MySQL and uses query rules to reroute, rewrite or reject queries matching a regex, often during incidents.
Shopify is replacing Longboat, its query-based change-data capture tool that polls MySQL replicas on an updated_at column, with a log-based CDC platform built on Debezium, Kafka Connect and Kafka that reads the binlog from 100+ MySQL shards.