I usually put this question in the second half of an interview. At midnight on a major sale day, two things turn red on the monitoring dashboard at the same time: a hit product has oversold by 200 orders (the number given in the prompt), and the payment page’s P99 has gone from a few hundred milliseconds normally to six seconds, while the customer service group chat is already flooding. The tech lead turns to you and asks which one you fix first.
Most people blurt out that they’d pick the lag. The reason is “user experience,” and six seconds is indeed a striking number. I usually follow up with one question: what consequences will each of these two things cause, and which one can still be remedied.
Post 5/10 of this series · Previous: Thirty thousand products in search results—who decides the ranking? · Next: Return rates are up—don’t rush to tighten the policy
Prioritization depends on “whether it can be undone”
I have only one criterion: handle first the things that are irreversible and have already created commitments to the outside world.
Overselling means the platform has taken the money and promised to ship, but the goods don’t exist. If this state drags on, it turns into out-of-stock compensation, complaints, platform penalties, and merchant disputes. Once the handling window passes, the only options left are paying money and apologizing—there is no third one. Lag is different: it is a recoverable experience loss. Rate limiting, queuing, page staticization—any of these can push it down; users will come back after waiting a few seconds, and during a major sale they already expect to “wait a bit.”
The nature of the two losses is also different. Lag hurts your own conversion rate on the spot; overselling hurts others—users’ money, merchants’ goods, and the commitments the platform has written into its rules. The former is a curve that can be estimated afterward; the latter is a pile of trouble that grows on its own.
So the first priority is to stop the overselling from expanding further: shut down the sales entry point for this product, or convert it to pre-sale or arrival notification, freeze the deduction of remaining inventory, and confirm where the boundary of already-generated orders lies. The tech side should work on reducing latency in parallel, but there is no need to wait for latency to recover before touching inventory.
There is a condition here that I expect candidates to bring up on their own: if the overselling is only two orders while the payment page is completely unavailable and affecting hundreds of thousands of users, the prioritization should be reversed. Judgment is not about reciting a formula; it is a comparison of magnitude and reversibility. Someone who can articulate the reversal condition themselves reassures me more than someone who just gives the answer.
There is another category of irreversibility that is easy to miss: wrong pricing. Being batch-ordered after a pricing error has the same root cause as overselling, and is even messier, because you don’t even have the relatively respectable excuse of “not enough stock.” Before a major sale, I require that one-click delisting, one-click campaign shutdown, and one-click coupon suspension all be made into switches that can actually be pressed, and that it be designated in advance who has the authority to press them.
Overselling is not a single database bug
When I dig into the cause, I don’t expect candidates to hand-write a distributed lock, but I do expect them to know between which stages inventory gets lost.
There are several common breakpoints: cached inventory doesn’t match the database, and a stale value is read; order reservation and actual deduction after successful payment are split into two steps, and the order timeout release collides with the payment callback; multiple warehouses and multiple stores share the same inventory, and each deducts its own when aggregating; flash-sale products and regular major-sale products are squeezed into one inventory pool; an upstream retry deducts the same order twice.
What the product side can really decide is the timing of deduction. If you reserve on order placement, users are unlikely to encounter “paid but no stock,” at the cost of having to design the reservation duration, timeout release, and how to handle a successful payment at the moment of release. Conversely, deducting only after successful payment won’t oversell, but it will make a batch of users who have already paid receive refunds—a greater experience harm that also carries financial loss risk. Most platforms choose reservation, which means treating the conflict as a normal path and writing it into the process: the payment callback prevails, insufficient inventory goes into a compensation queue, and the user is given a definite notification deadline.
I also add one more question: of these 200 orders, which ones actually count as overselling. Unpaid ones don’t count, user-initiated cancellations don’t count, ones blocked by risk control don’t count, and ones that can be transferred across warehouses maybe don’t count. Define the scope clearly before discussing the scale of compensation; otherwise the compensation plan is designed around an inflated number, and both the cost and the external announcement will be wrong along with it.
There is also a boundary condition: if this hit product is a virtual good, or was originally unlimited in supply, the concept of overselling doesn’t hold at all, and the problem is directly downgraded to latency and copy. A model that can’t distinguish physical inventory from virtual inventory makes all subsequent discussion empty.
The degradation ladder must be written before midnight
A major-sale contingency plan is not “add more machines.” It is a ladder with trigger conditions, actions, decision-makers, and rollback conditions. I require it to live in the PRD, not in the ops person’s head.
| Level | Trigger condition (illustrative) | Product-side action | Who can press it |
|---|---|---|---|
| L1 | Payment P99 exceeds threshold for 5 consecutive minutes | Disable non-critical recommendation and review loading, staticize product detail page | On-duty product manager |
| L2 | Order error rate continues to rise | Enable queue page, rate-limit new sessions, pause coupon issuance | On-duty lead |
| L3 | Inventory/price inconsistency appears | Close hit-product entry, freeze campaign price, switch to manual review | Product + operations dual sign-off |
| L4 | Large-scale payment unavailability | Stop new orders, keep paid-order lookup and announcements | On-duty commander |
The things most easily omitted from the table are “who can press it” and “what to watch after pressing it.” In the midnight war room, the most expensive cost is decision time; a three-level approval takes twenty minutes.
Thresholds can’t be copied either. Another company degrades when P99 exceeds 800 milliseconds because they normally run at 300; if you normally run at 900, using the same number means degrading once an hour. Trigger conditions should be written as multiples of your own baseline, not copied as absolute values.
Equally important are the rollback conditions for each level. After traffic subsides, who restores recommendations and coupon issuance, and which metrics must be confirmed before restoring—don’t let the degraded state hang on until the next morning. I’ve seen this in postmortems more than once; the loss isn’t large, but it badly drains trust between teams.
There is also a purely product-side contingency plan: the queue page must show estimated wait and an exit path, unpaid timed-out orders must have clear prompts, and announcement copy templates must be prepared in advance. In review meetings I go through these one by one, because they determine whether, at the moment the system degrades, users see “the platform is handling this in an orderly way” or a blank screen.
The compensation plan is not customer service script
After stopping the bleeding comes how to handle orders already generated. I require tiers, not a single line like “contact the user to negotiate.”
Unpaid orders: close them directly, state that it’s due to inventory, and give a compensation coupon with a time window. Watch here that it doesn’t stack with campaigns still running, or it becomes a second financial loss.
Paid and confirmed out of stock: notify within the promised deadline, offer two options—“full refund + compensation” and “exchange for a product at the same price”—and don’t make users apply on their own. Where price differences are involved, the price is based on the order snapshot.
Transferable or partially in stock: fulfill first for orders with earlier payment times, and route the rest to the previous tier; the rule must be explainable and auditable.
The face value and threshold of compensation coupons matter: too small feels perfunctory, too large is effectively giving money to scalpers. I keep it at the magnitude of “covering the user’s certain loss from one normal order,” then restrict the category and usage window, so it doesn’t become a second wave of inventory pressure during the campaign.
External and internal messaging must be consistent: customer service, announcements, and app push notifications must state the same number and the same deadline. The most trust-destroying practice I’ve seen is an announcement saying “system anomaly” while customer service privately tells users “we oversold”—the two don’t match, and by the next day it’s a screenshot.
In the retrospective, I require everything to land on verifiable changes: whether the load test covered this hit product’s inventory model, whether the reservation window was set too long, whether upstream and downstream reconciliation was in place, and whether the runbook’s switches were actually flipped once during a drill. A runbook that is never drilled might as well not exist.
How I read this question
The passing bar is staying calm, prioritizing by blast radius and reversibility, and knowing to stop the bleeding before fixing the experience.
The next tier up explains the trade-off between reservation and actual deduction, the statistical definition of overselling, and the trigger thresholds and decision-makers for each degradation step.
The strongest tier usually does two extra things: it treats compensation and public announcements as part of the product design and writes them in advance; and it points out that the root cause of such incidents is often not at midnight, but in a scheduling decision made weeks earlier—“delay the reconciliation job to make the campaign deadline.”
I close with a completely non-technical question: for next year’s big promotion, what would you cut in the requirements review. If the answer is “add more machines,” I am noncommittal; if the answer is “cut the two marketing gimmicks added at the last minute and give the time to load testing and runbook drills,” I will write it down.
Comments