System design interview guide
Shopify System Design Interview: How Checkout Survives a Flash Sale
Short answer
A good scenario to practise for a Shopify system design interview is flash sale checkout. A huge crowd must not break it. We have no public source that Shopify asks it. The key idea: keep each shop's sale inside its own isolated group of databases, called a pod. Then let in only as many buyers as checkout can handle. Shopify's own posts describe both. A component called Sorting Hat routes every request to its shop's pod. A throttle at the load balancer admits buyers at a safe rate. The rest get a cached queue page. A signed cookie keeps the queue fair. When payment starts, stock is held in the same MySQL database as the stock ledger. Each unit is one row, locked so that buyers take different units instead of waiting on one row.
Want the general version of this question, without one company's system? Design a flash sale system
Two courses by the author of this page:
770 lessons · 18 free to read
₹1,111 in India · $35 elsewhere, once
Get System DesignYou own this course
219 lessons · 10 free to read
₹1,333 in India · $35 elsewhere, once
Get Generative AI and Agentic AIYou own this course
Save your progress and get the interview checklist PDF
On Black Friday 2025, Shopify merchants sold a record $5.1 million per minute at the peak. Shopify's edge took 489 million requests per minute at its peak that weekend. In a flash sale, Shopify wrote in 2017, items can sell out in minutes. Checkout must stay correct for every buyer, and the other shops must not notice.
This guide designs checkout for a flash sale at Shopify. A flash sale is a short sale with limited stock that brings a huge crowd at one moment. Shopify's answer has four parts, and each is in its own engineering writing. First, the data is sharded. A shard is one of many databases that each hold part of the data. Shopify groups shops into pods: each pod has its own MySQL shard and its own other stores. So one busy shop cannot take down the others. Second, a throttle at the load balancer admits only as many buyers as checkout can handle. The rest wait on a queue page. Third, stock is held during payment with row locks in MySQL, so two buyers cannot get the last unit. Fourth, the whole platform is load tested for months before Black Friday.
Where it shows up
A common type of question for backend, infrastructure and production engineering interviews at e-commerce companies. We have no public source that Shopify uses this exact question. This guide is built from Shopify's own engineering blog and press releases, so you can reason with real numbers.
Spec sheetShopify
- 01Orders per minute at the peak, estimated
- ~44,000
- 02Edge requests per second at the peak, estimated
- ~8.2M
- 03App server requests per second at the peak, estimated
- ~2M
- 04Checkout capacity tested
- 80,000+ / min
worked through below, with the maths
Shopify in its own numbers
Every figure below is quoted from Shopify's own engineering writing. Tap a source to check it.
$5.1M
sales per minute at the peak, 12:01 p.m. EST, Black Friday 2025
Shopify press release, Dec 2025489M
requests per minute on the edge at the peak, Black Friday Cyber Monday 2025
Shopify press release, Dec 2025117M+
requests per minute on app servers at the peak, Black Friday Cyber Monday 2025
Shopify press release, Dec 20251.75T
database writes over the Black Friday Cyber Monday 2025 weekend
Shopify press release, Dec 202580,000+
checkouts per minute in a 2025 scale test before Black Friday
Shopify Engineering, 20251,000
ready-to-reserve rows kept per item and location
Shopify Engineering, 2026
Why this question is asked
A flash sale tests three skills at once. First, isolation: can you stop one hot customer from hurting everyone else? Second, admission control: can you decide who gets in when demand is far above capacity, and still be fair? Third, correctness under contention: can you sell exactly the stock you have when thousands of buyers want the same item? A candidate who only adds more servers has missed the point. Checkout is mostly writes to a database, and a cache cannot answer a write for you.
What the interviewer asks
“Design checkout for a Shopify store that runs a flash sale. A popular brand releases 5,000 units of a sneaker at noon. Hundreds of thousands of buyers arrive in the first minute. Every buyer must see a working page. Nobody may buy stock that does not exist. The other shops on the platform must keep working.”
Ask these back before you draw
- 1.Is this one shop's sale, or the whole platform on Black Friday? (Start with one shop; then scale to Black Friday.)
- 2.How much stock, and how fast does it sell out? (Assume minutes, as in Shopify's own flash sale stories.)
- 3.Must the queue be fair, first come first served, or is a lottery acceptable?
- 4.When is stock taken: when an item goes in the cart, or when payment starts?
- 5.Which payment providers, and how long can a payment take?
This page is the free part.
The course goes deeper on the Shopify design
₹1,111 in India$35 everywhere elseonce, for the whole course
The System Design course covers the Shopify design across a run of lessons, not one page. These 4 alone are about 90 minutes of step-by-step reading, every one with a quiz.
- Database Sharding
Splitting a database across multiple servers, the nuclear option for scaling writes, and the architecture behind Instagram, Uber, and YouTube.
- ACID Properties
Database transaction guarantees that keep your data correct.
- Leaky Bucket Algorithm
Requests drip out at a constant rate, smooth traffic shaping for APIs and networks.
- Throttling
Slow down instead of shut down, degrade gracefully when your system is under pressure.
all part of
System Design Masterclass
770 lessons · about 290 hours · 18 free to read
₹1,111in India, by UPI
$35everywhere else, by card or PayPal
It is really nice and good Please join the course
You own this course
Continue with Database Shardingpay once,
yours for life
Live from the course bench
Before you design Shopify, try the questions it rests on.
Real interview questions, live diagrams and measured lab results, pulled at random from the lessons. A new set every time you come back.
01Requirements
Requirements
Always clarify these in the first 5 minutes of the interview. Do not start drawing boxes until both lists are agreed.
Functional requirements
- A buyer adds the sale item to a cart and starts checkout
- When too many buyers arrive at once, the extra ones wait on a queue page instead of seeing errors
- Buyers who arrived earlier get in before buyers who arrived later
- Stock is held for a buyer while payment runs, then taken for good or released
- The shop never sells more units than it has, and never shows stock as sold when it is free
- When the item sells out, waiting buyers are told at once
- Other shops on the platform keep working normally during the sale
Non-functional requirements
- Isolation: one shop's sale must not slow down or break shops on other database shards
- Correct stock counts under heavy contention on a single item
- Peak load sized from real numbers: more than 117 million app server requests per minute at the peak of Black Friday Cyber Monday (BFCM) 2025
- The queue must work without a shared data store at the edge, which would be a new point of failure under high load
- Short database transactions, because database connections can run out before CPU does, as Shopify found in 2026
- Proven ahead of time: load tested above the expected peak, months before Black Friday
02Scale estimates
Back-of-envelope scale estimates
Show your math. Pulling numbers from thin air signals you have not thought about the load.
Orders per minute at the peak, estimated
~44,000
Shopify reported $5.1 million in sales per minute at the Black Friday 2025 peak, and an average cart of $114.70. Assume one cart is one order. $5,100,000 / $114.70 is about 44,000 orders a minute, or about 740 a second, across the whole platform.
Edge requests per second at the peak, estimated
~8.2M
Shopify's figure is 489 million requests per minute on the edge at the BFCM 2025 peak. Divided by 60, that is about 8.2 million a second. Our arithmetic, Shopify's input.
App server requests per second at the peak, estimated
~2M
More than 117 million requests per minute reached app servers at the peak. That is about 2 million a second. About one edge request in four reached an app server. The two peaks may not fall in the same minute, so this ratio is rough.
Checkout capacity tested
80,000+ / min
Shopify's fourth scale test before BFCM 2025 reached 146 million requests per minute and more than 80,000 checkouts per minute. That is almost double our estimated real order peak, which is the point of testing above the forecast.
One flash sale item
1 hot row set
However large the platform is, a flash sale puts thousands of buyers on one item in one shop. That means one pod, one MySQL shard and one small set of rows. This is the number to design for, not the platform total.
03Architecture
High-level architecture
Draw four layers. At the top are the buyers. Next is the edge: Shopify's load balancers. In 2017 Shopify described them running Nginx, a web server used as a load balancer. Nginx runs scripts in Lua, a small scripting language. The checkout throttle runs here as a Lua script. It counts the buyers entering checkout. The extra ones get a queue page that Nginx serves from its cache. In 2018 Shopify wrote that its load balancers also run Sorting Hat. It looks at each request and adds a header that says which pod serves that shop. Below the edge is the Rails application. In 2019 Shopify described its core as one large Ruby on Rails codebase, organised as a modular monolith. That means one app, split into components such as orders, shipping, inventory and billing. At the bottom are the pods. A pod is a group of shops on its own isolated set of datastores, including a MySQL shard. Each shop belongs to exactly one pod, so a flash sale lands on one pod. Inventory reservations are short holds on stock during payment. In 2026 Shopify wrote that they live in the same MySQL database as the stock ledger. The ledger records how many units each item has.
In a real interview, sketch this on the whiteboard before diving into any single box.

04One request
One buyer in a flash sale, from the sale page to a paid order
Each step restates something Shopify has published, or says where this design makes its own choice.
- 1
The request reaches the edge
The buyer clicks checkout. The request reaches Shopify's load balancers. Sorting Hat matches it to the shop's pod and adds a header naming that pod. Shopify has not published whether routing or throttling runs first.
- 2
The throttle decides
A Lua script in Nginx counts checkout entries for this shop in short periods of 5 seconds. Shopify calls this a leaky bucket. If there is room, the buyer goes through. If not, the buyer gets the queue page from the Nginx cache.
- 3
The queue page waits its turn
The queue page keeps asking again. A signed cookie holds the time of the buyer's first attempt. A signed cookie carries a cryptographic signature, so the buyer cannot change it. Buyers who came earlier get through first. Once through, another signed cookie lets the buyer skip the throttle for the rest of the session.
- 4
The app runs checkout
The Rails app reads the pod header and talks only to that pod's databases. It records the checkout, the address, shipping and taxes. In this design the reservations also live in the shop's pod database; Shopify has not said which database holds them.
- 5
Stock is held during payment
When payment starts, the app reserves units in one MySQL transaction. It locks free unit rows with SELECT ... FOR UPDATE SKIP LOCKED, so buyers do not wait on each other's rows.
- 6
Claim or release
If payment succeeds, a second transaction claims the reservation and takes the stock from the ledger for good. Shopify has not published the release path; in this design a failed or expired hold returns its units. Hold and ledger share one database, so stock cannot be lost between two systems.
05Components
Core components
Walk through each service. The interviewer wants to hear what each one owns, not just the names.
Edge load balancers (Nginx with Lua)
Nginx runs Lua scripts on every request and response. Shopify wrote in 2017 that this lets a small team of production engineers affect the whole core Rails app. The checkout throttle lives here. Sorting Hat also runs in Shopify's load balancers, per its 2018 post.
Sorting Hat (pod routing)
A component in the load balancers, described in 2018. Using a list of rules, it matches every request to a pod and adds a header. The app servers read that header to know which pod to talk to.
Checkout throttle and queue page
A count of buyers admitted into checkout, reset every 5 seconds, which Shopify called a leaky bucket in 2017. Overflow sees a queue page cached in Nginx. A signed cookie stores the buyer's first arrival time, so earlier buyers get priority.
Rails modular monolith
In 2019 Shopify called it one of the largest Ruby on Rails codebases. It was reorganised into components by business concept, such as orders, shipping, inventory and billing. Each component is built like a small Rails app inside the one application.
Pods (isolated groups of shops)
A pod is a set of shops on its own isolated set of datastores. Shopify's 2021 post says a pod has one MySQL shard, keyed by shop_id. It also has other datastores such as Redis and Memcached. Shared parts such as app servers and job workers may talk to only one pod at a time.
Inventory reservation service
Holds stock during payment. One row per sellable unit, kept in the same MySQL database as the stock ledger. It locks rows with SKIP LOCKED. Many buyers can then reserve the same item at once, without waiting for one row.
Load testing (Genghis) and the Resiliency Matrix
Genghis is Shopify's load testing tool. It runs scripted buyer journeys such as browsing, adding to cart and checking out. Weak points found in tests go into the Resiliency Matrix, which the teams fix before BFCM.
06Data model
Data model
Pick the right store per table. Justify each choice with the access pattern, not by reflex.
checkouts (in the shop's pod)shop_idcheckout_idcart linesaddress and shippingstatusupdated_atShopify wrote in 2017 that every checkout session created a new MySQL record, and every step changed that same record. That is why checkout is write-heavy and why it was taking down shards. Every shop-owned table carries shop_id, the sharding key.
reservation_units (ready-to-reserve pool)shop_idinventory_item_idinventory_group_idid (primary key is all four)Shopify's table name. One row per sellable unit, not one row with a quantity. Shopify caps the pool at 1,000 rows per item and location and refills it from the ledger. The four-column primary key took the lock count from two per reservation to one.
reserved_quantitiesshop_idinventory_item_idcheckout_idquantityexpires_atRows move here when payment starts. Shopify named the table; the columns here are our assumption. Reserve always deletes from reservation_units first, then inserts here, so every transaction takes locks in the same order.
inventory_ledgershop_idinventory_item_idlocation_idavailablecommittedThe source of truth for stock. Shopify has not published its columns; these are our assumption. The key fact is published: it lives in the same MySQL database as the reservations. So reserve and claim each change the hold and the ledger atomically.
07Deep dives
Deep dives
These are the conversations the interviewer is steering you toward. Practice each one until you can talk through it without notes.
Pods: stop one shop from taking down the platform
Shopify wrote in 2018 that by 2015 it could no longer buy a larger database server. So it sharded the database: it split the data across many databases. Every shop-owned table carries a shop_id, and that is the sharding key. But sharding alone hurt resilience. If any shard went down, any action that needed all shards failed everywhere. So Shopify built pods. A pod is a set of shops on a fully isolated set of datastores. Shared parts, such as app servers, job workers and load balancers, may talk to only one pod at a time. No action may reach across pods. This is what makes a flash sale safe for everyone else. In 2017 Shopify wrote about one merchant's sale. It took down her store and all the others on the same shard. With pods, the damage to the databases stops at the pod's edge.
Routing: Sorting Hat sends each request to its pod
The app servers are shared, so each request must say which pod it belongs to. In 2018 Shopify described Sorting Hat, a piece of software in its load balancers. It matches every request to a pod using a list of rules, and adds a header. The app server reads the header and connects to that pod's datastores. Each pod is also assigned a pair of data centers. One is active and the other is a recovery site. Shopify built a tool called Pod Mover. It moves a pod to its recovery data center in about a minute, without dropping requests or jobs. Shops also move between pods. In 2021 Shopify described shard balancing with Ghostferry, its open source tool. It copies a shop's rows in batches. It also tails the binary log, MySQL's record of every change, to replay changes made during the copy. When few changes are left, it enters a short cutover: the moment the shop switches to the new pod. During the cutover, writes to the source must stop. Shopify used two shops with synchronized flash sales on one pod to explain why shops move.
The checkout throttle: admit only what checkout can take
Shopify wrote in 2017 that checkout, with its many writes, was still taking down parts of the platform. Its answer was to throttle buyers at the edge. Shopify called it a leaky bucket. In its version, a count of admitted requests reset every period of 5 seconds. Once the count hit the limit, the next ones were turned away. Strictly, a count that resets every period is a fixed window counter. The difference matters: a fixed window can let a double burst through at the boundary between two windows. A buyer who got through received a signed cookie to skip the throttle for the rest of the session. A buyer who did not was sent to a queue page rendered by Shopify and cached in Nginx. The queue page costs almost nothing to serve, so the crowd waits without touching the database. The key idea for an interview: protect the database at the cheapest layer, before the request does any work. The listing below is an illustration, not Shopify's code. Note the key holds the shop, so one shop's sale cannot fill another shop's count.
local limit, period = 500, 5 -- admits per shop per 5 s, on this load balancer
if has_signed_pass() then return end -- buyers already let in skip the count
local window = math.floor(ngx.now() / period)
local key = "checkout:" .. ngx.var.shop_id .. ":" .. window
local used = ngx.shared.throttle:incr(key, 1, 0, period * 2)
if used > limit then
return ngx.exec("/queue") -- cached queue page
endMaking the queue fair without a data store
The first throttle was not fair. Queued buyers simply polled again at random, so it was a lottery. Shopify wrote in 2017 that some buyers waited on the queue page for up to 40 minutes. The obvious fix is a central queue with ticket numbers. But Shopify wanted a solution without a data store. It wrote that a data store would be a new point of failure, especially under high load. Its load balancers were also in several data centers, and copying data between them is hard and slow. So each buyer's first attempt time went into a signed cookie. Each load balancer keeps a threshold time and computes it on its own. Buyers whose first attempt came before the threshold are high priority and move on to the bucket. Buyers after the threshold stay on the queue page, which keeps asking again. When the bucket has spare room, the threshold moves closer to the current time and more buyers become high priority. When it is full, the threshold moves back. Shopify tested the rule in simulations. It settled on moving the threshold in proportion to how far the bucket was from its limit. The result: earlier buyers no longer lose to later ones, and no load balancer needs to ask another.
Inventory: hold stock during payment without overselling
Shopify wrote in 2026 that it reserves inventory during payment. When payment starts, items are marked reserved for a short hold of several minutes. The first design kept reservations in Redis and the stock ledger in MySQL. Redis handled the concurrency well. But the claim step had to update MySQL and clean up Redis. Those two could not be one atomic step. A crash between them could oversell, or leave stock marked reserved after it was sold. So Shopify moved reservations into the same MySQL database as the ledger. Reserve and claim each became an ACID transaction, meaning all of it happens or none of it does. Shopify also changed the shape of the data. Instead of one row per item with a quantity, there is one row per sellable unit. Reserving three units moves three rows in one transaction. SELECT ... FOR UPDATE SKIP LOCKED makes it scale. If another transaction has locked some rows, MySQL skips them and returns other free rows. Buyers no longer queue behind one hot row. The listing is an illustration, not Shopify's code.
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
START TRANSACTION;
SELECT id FROM reservation_units
WHERE shop_id = ? AND inventory_item_id = ? AND inventory_group_id = ?
LIMIT 3 FOR UPDATE SKIP LOCKED; -- free units only, no waiting
-- fewer than 3 rows back: refill the pool or report sold out
DELETE FROM reservation_units
WHERE shop_id = ? AND inventory_item_id = ? AND inventory_group_id = ?
AND id IN (...); -- full key, units first
INSERT INTO reserved_quantities (...) VALUES (...); -- then the hold
COMMIT;The details that made reservations work at peak
Shopify keeps a pool of free unit rows, capped at 1,000 per item and location. It sized the pool from observed peak reservation rates during flash sales. A refill process tops the pool up from the ledger. If a hot item empties its pool, a lock lets only one transaction refill it. The other reservations for that item wait a moment. That avoids a stampede of refills and keeps the count correct. Three MySQL details mattered. A four-column primary key cut the locks per reservation from two to one. Next, the isolation level. REPEATABLE READ, MySQL's default, keeps one snapshot for the whole transaction. READ COMMITTED sees each committed change. Switching to READ COMMITTED stopped gap locks from blocking the refill. A gap lock is a lock on the space between rows, which can block inserts. Last, a fixed lock order, units first and holds second, removed deadlocks. The final limit was not CPU at all. It was connection exhaustion at ProxySQL, a proxy that pools connections to MySQL. Other code held connections longer, and reservations were the last straw. Cleaning up the checkout path removed 50% of reads and 33% of transactions on the primary database. During high-volume flash sales, writer CPU then stayed under 50% and reader CPU under 16%.
Getting ready for Black Friday: Genghis and five scale tests
Shopify wrote in November 2025 that its BFCM preparation starts in March with capacity planning on Google Cloud. It models traffic from past data and merchant growth and gives its estimates to its cloud providers. All year it runs fire drills at 150% of the previous year's BFCM load. From April to October 2025 it ran five major scale tests on production infrastructure. Its load testing tool, Genghis, runs scripted journeys: browsing, adding to cart and checking out. Flash sale bursts are added on top of the normal load. By the fourth test it reached 146 million requests per minute and more than 80,000 checkouts per minute. The last test went to 200 million requests per minute. That was the p99 forecast: a traffic level Shopify expected to be exceeded only 1 time in 100. Each test found bottlenecks, such as memory, timeouts and Kafka, the system that streams messages between services. In the first two tests, Shopify wrote, core operations threw errors under heavy load and checkout queues backed up. Every finding went into the Resiliency Matrix, the list of weak points to fix before the real day.
Common mistakes candidates make
The first mistake is to put a cache in front of checkout and call it done. A cache helps the product page, not checkout. Checkout is writes, and Shopify's own 2017 post says writes were what took shards down. Say instead that you will protect the database by admitting fewer buyers at a time. The second mistake is a single counter, such as stock = stock - 1 on one row. Every buyer then waits on the same row lock, and the sale slows to one buyer at a time. Say instead that you will use one row per unit with SKIP LOCKED, or split the count. The third mistake is to hold stock in a separate system from the ledger, such as Redis. Then you must explain how the two stay in step. Shopify moved away from exactly that design because it could oversell. The fourth mistake is to forget the other shops. If your design shares one database for all shops, one sale can stop them all. Mention isolation, such as pods, early. The fifth mistake is to keep buyers waiting after the item has sold out. In this design, when the pool and the ledger reach zero, the shop sets a sold-out flag. The edge serves that flag from cache. The queue page then tells waiting buyers at once.
08Trade-offs
Trade-offs to discuss
Every senior interviewer expects you to surface at least 3 of these. Pick the decisions, state the alternatives, and justify your choice.
Throttle at the edge vs let every buyer reach the app
Letting everyone in is simple, but the database then fails for everyone, including buyers who would have paid. A throttle at the edge turns failure into waiting. The cost is a queue page and some buyers who wait. A cached page is almost free to serve, so the trade is worth it.
Fair queue in signed cookies vs a central ticket store
A central store gives exact ticket numbers. But it becomes a new point of failure under high load, and it is hard to copy between data centers. Shopify chose signed cookies and a threshold that each load balancer computes on its own. You give up exact ordering across load balancers; you gain an edge that scales by adding machines.
Reservations in the same MySQL database vs in Redis
Redis is fast and handles concurrent counters well. But a hold in Redis and a ledger in MySQL cannot be changed in one transaction. Shopify moved reservations into MySQL so reserve and claim each change both atomically. The cost is more careful MySQL work: SKIP LOCKED, the row pool, isolation level and lock order.
One row per unit vs one row with a quantity
A quantity column is compact, but every buyer must lock the same row. One row per unit lets many buyers lock different rows at once. The cost is more rows and a refill process, which Shopify bounds at 1,000 free rows per item and location.
Pods vs one shared database cluster
One cluster is simpler to run. Pods cost more tooling: routing with Sorting Hat, moving shops with Ghostferry, and moving whole pods with Pod Mover. In return, a flash sale or a failure stays inside one pod's databases.
A modular monolith vs microservices
In 2019 Shopify described keeping one Rails application and splitting it into components with clear boundaries. In this design, checkout calls inventory inside the same process, and both use the shop's pod database. Microservices would add network calls and distributed transactions to the hottest path. The cost is discipline: the boundaries between components must be enforced in code.
Free PDF · 18 pages
Get the free System Design Interview Cheat Sheet
The interview in seven stages, the numbers worth knowing by heart, and twelve classic systems on one page each, every line linked to the lesson it comes from.
09Follow-ups
Follow-up questions to expect
After the main design, the interviewer usually picks one part and asks more. Here is what to say.
Two big flash sales are planned on the same day, for shops on the same pod. What do you do?
Move one shop to a quieter pod before the sale. Shopify described this case in its 2021 post on shard balancing. Ghostferry copies the shop's rows in batches and replays changes from the MySQL binary log. Then it makes a short cutover to the new pod.
The payment provider is slow, and the hold expires before payment is approved. What happens?
Shopify has not published this path. In this design the claim step checks that the hold still exists, inside the same transaction that takes the stock. If the hold is gone, no order is created and the payment is voided or refunded. Every payment call carries an idempotency key, a unique ID per attempt, so a retry never charges the buyer twice. The hold should also last longer than the provider's slowest normal approval.
How do you pick the throttle's limit?
From load tests, not guesses. Measure how many checkouts per minute a pod can complete before latency or errors climb. Then set the limit below that. Each load balancer counts on its own, as in Shopify's 2017 design. So the real admission rate is the limit per balancer times the number of balancers. Change the fleet size and you change the rate.
Your load test passes, but on the day the database runs out of connections. Why?
Connections, not CPU, can be the real limit. Shopify found exactly this with inventory reservations in 2026. CPU was not maxed out, but connections to MySQL ran out at the ProxySQL layer. Shopify tagged every SQL statement with a comment naming the business process, to see who held connections. Cleaning up the checkout path then removed 50% of reads and 33% of transactions on the primary database.
A whole data center fails during the sale. What happens to the pod?
In Shopify's 2018 design, each pod has a pair of data centers, one active and one for recovery. Shopify's Pod Mover moves a pod to its recovery data center in about a minute, without dropping requests or jobs.
10In production
How Shopify actually does it
Every fact about Shopify on this page comes from Shopify's own writing. The estimates and anything marked 'in this design' or 'assume' are ours. Pods, Sorting Hat, the pair of data centers and Pod Mover are from the 2018 post on the pods architecture. The MySQL shard in each pod, the shop_id key and Ghostferry are from the 2021 post on shard balancing. The throttle, the queue page, the signed cookies and the fair queue are from two 2017 posts on flash sales. The modular monolith is from the 2019 post on deconstructing the monolith. Inventory reservations in MySQL are from the 2026 post. BFCM preparation, Genghis and the scale test numbers are from the November 2025 readiness post. The BFCM 2025 sales and traffic numbers are from Shopify's December 2025 press release. Older posts describe the system at that date. Shopify has changed details since, so say the year when you quote a number in an interview.
Sources
- Shopify Engineering: A Pods Architecture to Allow Shopify to Scale (2018)
- Shopify Engineering: Shard Balancing, Moving Shops Confidently with Zero-Downtime at Terabyte-scale (2021)
- Shopify Engineering: Surviving Flashes of High-Write Traffic Using Scriptable Load Balancers, Part I (2017)
- Shopify Engineering: Surviving Flashes of High-Write Traffic Using Scriptable Load Balancers, Part II (2017)
- Shopify Engineering: Deconstructing the Monolith (2019)
- Shopify Engineering: How we prepare Shopify for BFCM (2025)
- Shopify Engineering: We replaced Redis with MySQL for inventory reservations (2026)
- Shopify press release: record $14.6 billion in Black Friday Cyber Monday sales (Dec 2025)
- Shopify news: BFCM 2025 data (Dec 2025)
Lessons to study before this interview
If any of these topics are fuzzy, the interviewer will catch it. Each lesson is 15 to 60 minutes with diagrams, code, and a quiz.
Database Sharding
foundation / database fundamentals
ACID Properties
foundation / core fundamentals
Leaky Bucket Algorithm
intermediate / api design protocols
Throttling
intermediate / api design protocols
Monolithic Architecture
intermediate / microservices architecture
Load Testing
intermediate / devops cicd
Bulkhead Pattern
advanced / reliability resilience
Load Shedding
advanced / reliability resilience
Capacity Planning
advanced / reliability resilience
Capstone: Design an E-Commerce Platform
capstone / capstone
System design interviews at companies in the US, UK, Canada and Singapore
41 walkthroughs of real systems at well-known companies, each built from that company's own engineering blog, talks or filings, with the numbers cited.
Banking, payments and trading
Commerce and delivery
- Shopify system design (this page) (Canada)
- DoorDash system design
- Amazon system design
- Airbnb system design
- Agoda system design (Singapore)
- Uber Eats system design
Rides and maps
- Grab system design (Singapore)
- Uber system design
Feeds, social and messaging
Streaming and media
AI labs and big tech
Developer and collaboration tools
11FAQ
Frequently asked questions
Go deeper
This guide is built on these 6 lessons. Each one teaches one piece of the Shopify design above, step by step.
- Database ShardingSystem Design · database fundamentals · 35 min
- ACID PropertiesSystem Design · core fundamentals · 25 min
- Leaky Bucket AlgorithmSystem Design · api design protocols · 15 min
- ThrottlingSystem Design · api design protocols · 15 min
- Monolithic ArchitectureSystem Design · microservices architecture · 20 min
- Load TestingSystem Design · devops cicd · 11 min
Practice with 770 system design lessons
Lifetime access for ₹1,111 in India or $35 elsewhere. Interactive diagrams, quizzes, and 20 capstone projects to practise on.
This one question is not enough for the interview.
Get all 200 questions in the System Design and Distributed Systems pack
Each question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram (268 diagrams in all). A PDF you keep, junior to staff level.
Pay by UPI, cards or netbanking through Razorpay. Pay by card or PayPal, in US dollars. Download at once from My packs.
NEWSystem Design Hands-On
Included in the System Design course: real systems, built live
Postgres Sharding: Complete Hands-On (PgBouncer + Citus). 2 h 36 min and 20 chapters: one PostgreSQL loaded until it breaks, then four shards behind a router you write, PgBouncer and Citus, with the 139-page slide deck. The first 15 minutes are free to watch.


