Quick revision
The short answer
I would decide from the costs, not the technology: engineering weeks per sale, the slowdown for regular checkout, complaints and bot purchases, set against the revenue and new customers the sales bring. Usually the answer combines a dedicated, isolated sale path that turns each sale into configuration, a change of mechanism such as pre-registration with a draw or longer windows that removes much of the peak, and shared order, payment and inventory services behind clear interfaces so rules do not drift, with success measures agreed with marketing and reviewed after every sale.
What to remember
In this answer, we framed the flash-sale question as a decision about costs: engineering weeks, slower regular checkout, complaints and bots against revenue and new customers. We compared a dedicated isolated sale path, hardening the main stack and changing the sale mechanism, saw why reusing the shared order, payment and inventory services beats forking them, and chose a combination with success measures agreed with marketing and reviewed after every sale.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would decide from the costs, not the technology: engineering weeks per sale, the slowdown for regular checkout, complaints and bot purchases, set against the revenue and new customers the sales bring. Usually the answer combines a dedicated, isolated sale path that turns each sale into configuration, a change of mechanism such as pre-registration with a draw or longer windows that removes much of the peak, and shared order, payment and inventory services behind clear interfaces so rules do not drift, with success measures agreed with marketing and reviewed after every sale.
Why this question is asked
Weekly flash sales are a classic collision between a marketing success and an engineering cost that grows quietly until it hurts other customers. Hardening everything for a peak that lasts minutes is expensive, building a separate platform risks a second commerce system that drifts from the first, and changing how the sale works is often the cheapest fix but needs marketing to agree. Interviewers ask this to see how a senior leader frames a decision across teams. In this answer, we will name the costs with numbers, look at the three options and what each really costs, explain why reuse beats forking, and finish with how I would decide and measure success.
1Naming the Costs
The first step is to make the hidden costs visible, because each team sees only its own part. Suppose each sale has needed about 2 weeks from 4 teams, that is 8 team-weeks, which at a weekly cadence would consume more engineering than the company has. During the last two sales, regular checkout p99 latency rose from 800 ms to 4 seconds for 20 minutes, and conversion for normal shoppers dropped by an amount finance can price. Support handled around 3,000 complaints per sale, mostly from people who never had a chance, and we suspect bots bought a meaningful share of units.
On the other side are real benefits: traffic, press, and new customers, some of whom come back. We put both columns on one page, with the same units where possible, so the discussion is about trade-offs rather than about whose pain is bigger.
| Item | Measure | Example today |
|---|---|---|
| Engineering effort | team-weeks per sale | 8 |
| Regular checkout | p99 latency during the sale | 800 ms -> 4 s for 20 minutes |
| Support | complaints per sale | about 3,000 |
| Fairness | units bought by suspected bots | to be measured |
| Revenue | sale revenue plus repeat buyers | from finance |
| New customers | first-time buyers retained after 90 days | from analytics |
2Option A: A Dedicated, Isolated Sale Path
A dedicated path is not a second shop; it is a narrow road built for one kind of traffic. Static pages and a countdown from the CDN, a waiting room that admits buyers at a measured rate, an in-memory stock gate that rejects losers in microseconds, and asynchronous order creation at a rate the shared services can absorb. It runs on its own capacity, so the sale's peak never reaches the servers and database pools that regular checkout uses.
The payoff is twofold. Regular shoppers are protected, and each sale becomes configuration (item, units, start time, limits) rather than a project. After the first few months of building, a sale might take a day of setup instead of 8 team-weeks.
3Option B: Harden the Main Commerce Stack
The alternative is to make the main stack strong enough for the peak. That means capacity for hundreds of times normal traffic for a few minutes a week, plus removing every hot spot, such as single stock rows, that a flash sale exposes. It is the option that sounds simplest and usually costs the most, because we pay for peak capacity all week and change many services at once.
Some hardening is worth doing anyway: rate limits per client, bulkheads that keep one feature's traffic from exhausting shared pools, and load shedding of non-essential calls. Those make the whole shop more resilient. But hardening alone keeps sales and normal shopping in the same blast radius.
4Option C: Change How the Sales Work
Often the cheapest engineering decision is a product decision. A sale where 2 million people try to buy 10,000 units in 40 seconds creates the peak, the bots and the complaints all at once. Pre-registration over a few days followed by a random draw keeps the excitement and the press, spreads purchases into time slots, removes the speed advantage that bots exploit, and gives everyone who was not selected a clear answer early. Longer windows, such as a sale open for 24 hours with fair allocation at the end, have a similar effect.
Marketing may worry that the urgency is part of the appeal. That is a fair point to test, not to assume: run one sale as a draw and compare conversion, press coverage and complaints.
5Reuse Rather Than Fork
Whichever path we build, it must not become a second copy of commerce. The sale path calls the shared order, payment and inventory services through clear interfaces, for example 'create order for this reserved unit', rather than reimplementing tax, discounts, fraud checks or fulfilment. Otherwise, within a year the two systems disagree about a tax rule or a refund policy, and customers find the gap before we do.
- Sale edgeCDN pages, waiting room, sale token
- Sale gatein-memory stock, one unit per user, its own capacity
- Order queuewinners fed at a rate the core can sustain
- Shared core servicesorder, payment, inventory, tax, fraud: one copy of the rules
- Regular checkoutuses the same core, isolated from the sale's peak
5 layers, from the top down. Step through them one at a time.
Isolation at the edge, reuse at the core.
6How I Would Decide and Measure Success
With the costs on the table, I would propose a combination: change the mechanism for the biggest sales, build a thin dedicated sale path for the rest, and keep all business rules in the shared services. I would not commit to a weekly cadence until the path exists; for the first quarter, sales run every two or three weeks.
Then we agree success measures with marketing before the first sale, so the review is about data: conversion and revenue per sale, new customers retained after 90 days, fairness complaints, the share of suspected bot purchases, engineering hours per sale, and, as a hard guardrail, regular checkout p99 latency staying under its normal target during every sale. After each sale we review those numbers together and adjust.
7Follow-up questions
What if marketing insists on a pure first-come sale?
Then we keep it, but on the isolated path with a waiting room and a stock gate, and we report the fairness and bot numbers after each sale. Decisions made with shared data tend to move over a few sales; arguing in the abstract rarely moves anyone.
How do you avoid the dedicated path becoming unmaintained?
Give it an owning team, run it every sale rather than once a quarter, and keep it thin: it owns the edge, the gate and the queue, nothing else. Business rules stay in the shared services, so the path has little reason to change when the business does.
How long would the dedicated path take to build?
With an existing CDN, Redis and Kafka, a small team can usually deliver a first version in one to two quarters, reusing the order and payment services. The first sales on it should be small, with the old process as a fallback.
8Conclusion
In this answer, we framed the flash-sale question as a decision about costs: engineering weeks, slower regular checkout, complaints and bots against revenue and new customers. We compared a dedicated isolated sale path, hardening the main stack and changing the sale mechanism, saw why reusing the shared order, payment and inventory services beats forking them, and chose a combination with success measures agreed with marketing and reviewed after every sale.
Open with
I would start by putting all the costs on one page, because each team only sees its own: about eight team-weeks per sale, regular checkout slowing from 800 milliseconds to 4 seconds at p99, thousands of complaints, and an unknown share of bot purchases, against the revenue, press and new customers the sales bring.
Then, if they want more
Then I would compare three options. Hardening the main stack means paying for peak capacity all week and keeping normal shoppers in the same blast radius, so on its own it is usually the most expensive.
A dedicated path, CDN pages, a waiting room, an in-memory stock gate and asynchronous orders on separate capacity, protects regular checkout and turns each sale into configuration instead of a project.
And changing the mechanism, like pre-registration with a draw or longer windows with fair allocation, can remove most of the peak and the bot advantage while keeping the marketing value. Whatever we build has to reuse the shared order, payment and inventory services through clear interfaces, so tax, discount and refund rules never drift into two copies.
My proposal would usually be a combination: a thin dedicated path, a draw for the biggest sales, and a slower cadence until the path exists. And I would agree success measures with marketing up front, conversion, retention, fairness complaints, engineering hours and checkout latency for other shoppers, and review them after every sale.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "As the senior technical leader, how do you decide whether to build a dedicated...": https://scrivio-interview-library.netlify.app/architecture/system-design-problems/70a3bb12e8/