Skip to content
SeeItFlow
System Design · Interview Perspective · ~24 min read

Interview Perspective

How to structure an e-commerce platform design interview -- what to say, what to demonstrate, common mistakes, and a comprehensive question-and-follow-up bank spanning scope, catalog, search, cart, inventory, checkout, payment, messaging, fulfillment, flash sales, consistency and failure curveballs.

Mangesh MandlikLast updated:
Interview 01

How to Structure Your Answer

Open with workload heterogeneity, then let each correctness problem justify each architectural addition -- do not open with a fifteen-service diagram.

State this early: 'This platform has several distinct workloads -- catalog browsing, search, pricing, inventory reservation, checkout, payment, and fulfillment -- each with different consistency and scaling requirements. I'd architect them differently rather than force one model on all of them.' This single sentence signals mature systems thinking before you've drawn a single box.

Clarify scope in the first few minutes: single retailer or marketplace? Physical or digital goods? Product variants/SKUs in scope? Multiple sellers? Is payment processing itself in scope, or a black box you reference? Returns/refunds? Multiple warehouses? Flash sales? Expected scale? Multi-region?

Then walk requirements, deliberately separating functional from non-functional, and naming which non-functionals conflict: browse latency favors caching; inventory correctness opposes caching for the reservation decision specifically. Naming this conflict -- and showing you'll resolve it per-workload rather than platform-wide -- is the core signal.

Start simple: User -> API -> Application -> Database, showing product browsing. Let each problem naturally justify each addition -- search index for relevance, cache for read load, reservation model for oversell, saga for checkout, outbox for reliable events, reconciliation for the gaps retries alone don't close.

Interview 02

Key Concepts to Demonstrate

The concepts that separate a thoughtful e-commerce answer from a generic distributed-systems answer.

Workload separation

Name the distinct workloads explicitly and show each gets the architecture it needs, not a uniform one.

Product vs. SKU vs. price

Distinguish descriptive identity (Product), the purchasable unit (SKU), and commercial terms (Offer/Price) -- and distinguish display price from the authoritative checkout quote.

Cache appropriateness

Explain precisely where caching is safe (display, discovery) and where it's dangerous (the reservation decision itself) -- the distinction, not just the existence of caching, is the insight.

Reservation identity and lifecycle

A reservation is a durable record with an identity, quantity, state and expiry -- not just an atomic decrement. Name the ACTIVE -> COMMITTED / RELEASED-EXPIRED lifecycle.

Checkout as a saga

Name the distributed-transaction problem and the saga/compensation pattern explicitly, including that compensation is a fallible operation, not a rollback.

Payment timeout is not payment failure

State this explicitly -- a reservation should not be blindly released just because payment timed out, since the payment may have succeeded.

Transactional outbox

Name the DB-to-broker dual-write gap and the outbox pattern that closes it, and be ready to explain that outbox delivery is at-least-once, so consumers still need to be idempotent.

Reconciliation

Name it proactively as the backstop for divergence retries alone don't resolve -- payment/order mismatches, inventory/order mismatches, stuck outbox rows -- not just a sweep of one specific stuck state.

Key takeaways
  1. 01Open with workload heterogeneity -- it's the central insight
  2. 02Cache catalog/search aggressively; never cache the reservation decision itself
  3. 03A reservation is a durable, identified record with a lifecycle -- not an atomic decrement alone
  4. 04A timeout does not mean payment failed -- don't release inventory on timeout alone
  5. 05Name the saga pattern and that compensation is a fallible operation
  6. 06Transactional outbox closes the DB-to-event dual-write gap; consumers still need idempotency
  7. 07Reconciliation catches what retries alone don't -- across payment, inventory and order state
  8. 08"Optimize reads aggressively, protect correctness-critical decisions carefully"
Interview 03

Common Mistakes

Mistakes that reveal template application rather than genuine understanding of the domain.

Caching the reservation decision

Treating inventory as a normal cacheable value causes oversell -- the cached count reads stale between the last write and the reservation check.

Uniform consistency

Applying the same consistency model to every workload. Catalog display and inventory reservation have opposite requirements -- one model cannot serve both well.

Treating payment timeout as failure

Releasing the reservation or declining the order the moment payment times out, without considering that the payment may have actually succeeded.

Synchronous fulfillment coupling

Making checkout confirmation wait on fulfillment or notification. A warehouse backlog should never become a checkout outage.

Collapsing order, payment and fulfillment into one status

A single order_complete boolean can't represent 'confirmed but not yet shipped' or 'paid but refund in progress.' These are three separate state machines.

Missing the last-item race

Not addressing what happens when two shoppers try to check out the last unit simultaneously -- this is the single most important correctness problem in the whole design.

Assuming the broker makes the DB write durable

Publishing directly after a DB commit without naming the dual-write gap, or claiming a specific broker technology inherently 'guarantees' delivery independent of configuration and consumer behavior.

Interview 05

Question Bank: Cart & Inventory

Cart semantics, then the core correctness problem of the whole design: inventory reservation.

Q

Should adding an item to cart reserve inventory against it?

Strong answer angle

Strong answer direction: reserve-at-checkout is the reasonable baseline for ordinary retail -- reserving on add-to-cart risks abandoned carts blocking popular inventory indefinitely. Extremely scarce, time-boxed inventory is a domain where earlier reservation is deliberately chosen instead. What interviewer is testing: whether 'reserve at checkout' is understood as a baseline for a reason, not dogma. Read deeper: Trade-offs -> Cart vs. Inventory Reservation.

Likely follow-ups
  • What does the cart actually store? — SKU/variant identity, quantity, and commonly a displayed-price snapshot for UX -- never authoritative for the final charge.
Q

Two users try to buy the last unit of a SKU at the same instant. What happens?

Strong answer angle

Strong answer direction: an atomic conditional reservation -- UPDATE ... WHERE available >= qty -- ensures exactly one of the two requests succeeds; the loser gets an informative 'no longer available' response. The reservation itself needs a durable identity (reservation_id, checkout/order id, sku, quantity, state, expiry), not just a decremented counter. What interviewer is testing: this is the single most important correctness question in the whole design. Read deeper: Inventory Reservation.

Likely follow-ups
  • Is a conditional SQL update the only way to implement this? — No -- optimistic versioning, row locks, and serialized per-SKU processing are all valid, chosen based on contention level.
Q

What happens if the same reservation request is retried?

Strong answer angle

Strong answer direction: the reserve operation must be idempotent -- a retry carrying the same checkout/reservation identity finds the existing ACTIVE reservation rather than creating a second one. What interviewer is testing: whether idempotency is applied consistently across the whole checkout path, not just at the API's outer edge.

Q

What releases an abandoned reservation?

Strong answer angle

Strong answer direction: a durable, recoverable expiry mechanism -- a scheduled scan, a delayed queue message, an expiry index, or a workflow timer -- not just a cache TTL notification, which can't be relied on as the sole correctness mechanism. What interviewer is testing: whether 'TTL' is understood as needing a durable enforcement mechanism behind it. Read deeper: Reservation Expiry.

Likely follow-ups
  • What if commit and expiry race at nearly the same instant? — A conditional/versioned transition ensures only one of the two wins -- see Failure & Scale -> Reservation Expiry Race.
Q

Does 'never oversell' hold for every business?

Strong answer angle

Strong answer direction: it's the baseline invariant this design teaches, but some businesses intentionally support backorders/preorders. The invariant that generalizes: reservations must never allocate beyond what the SKU's own inventory policy permits, whatever that policy is. What interviewer is testing: whether absolute claims are qualified against real product variation.

Q

How does this extend to multiple warehouses?

Strong answer angle

Strong answer direction: inventory becomes a per-SKU-per-location record; checkout may need to choose a fulfilling location, and availability shown pre-checkout can remain approximate across locations. What interviewer is testing: whether multi-location is treated as a bounded extension rather than either ignored or over-built into a full warehouse-management design.

Interview 06

Question Bank: Checkout & Payment

The distributed-transaction core of the design: checkout orchestration and its payment boundary.

Q

Why can't checkout be one ACID transaction?

Strong answer angle

Strong answer direction: inventory, order, and payment are different systems (and payment is external), so no shared database transaction can span all of them. The saga pattern coordinates local commits with compensating actions instead. What interviewer is testing: whether the distributed-transaction problem is named precisely, not hand-waved as 'we'll use a transaction.' Read deeper: Checkout Orchestration.

Q

Does the order exist before or after payment?

Strong answer angle

Strong answer direction: create/reuse a durable pending checkout-order identity before the payment attempt -- this gives crash recovery a stable anchor. Creating the order only after payment succeeds trades away that recoverability for slightly less bookkeeping. What interviewer is testing: whether the candidate has a clear, defensible answer rather than leaving the ordering ambiguous. Read deeper: Trade-offs -> Order-Before-Payment vs. Order-After-Payment.

Q

How do you make Place Order idempotent?

Strong answer angle

Strong answer direction: a stable checkout idempotency key (client-generated or server-issued) maps to a durable uniqueness constraint; a stored request fingerprint detects a conflicting reuse of the same key. What interviewer is testing: whether idempotency is modeled as a durable database guarantee, not a client-side convention alone. Read deeper: Checkout Idempotency.

Q

Payment times out. Do you release the inventory reservation?

Strong answer angle

Strong answer direction: not immediately -- a timeout is ambiguous, not a definitive failure. The payment may have actually succeeded. Apply an explicit bounded policy: extend the reservation while payment resolves, or define a later-success recovery/refund path if it must expire first. What interviewer is testing: this is the single most commonly missed nuance in e-commerce checkout design. Read deeper: Failure & Scale -> Payment Unknown, Reservation Nearing Expiry.

Likely follow-ups
  • What if the reservation must expire before payment resolves? — The system needs a pre-defined later-success recovery/refund path, not an improvised one discovered after the fact.
Q

What if the checkout orchestrator crashes mid-saga?

Strong answer angle

Strong answer direction: every step is durably recorded before the next is triggered, so the orchestrator resumes from the last known state on restart, and every command (reserve, charge, confirm) is idempotent so re-issuing the current step is always safe. What interviewer is testing: whether recoverability is designed in, not assumed. Read deeper: Failure & Scale -> Checkout Orchestrator Crash.

Q

Payment fails after inventory was reserved. What happens?

Strong answer angle

Strong answer direction: a definitive failure triggers a compensating release of the reservation -- but compensation itself can fail (the release call can error out), so it's retried idempotently with reservation TTL as the ultimate backstop. What interviewer is testing: whether compensation is understood as its own fallible operation, not automatic rollback. Read deeper: Checkout Compensation.

Q

How deep do you need to go on payment mechanics themselves?

Strong answer angle

Strong answer direction: reference the Payment System module for idempotency keys, provider timeout ambiguity, webhooks and reconciliation on the payment side -- this module's job is the checkout/order/inventory boundary around payment, not payment internals themselves. What interviewer is testing: whether scope discipline is maintained instead of re-deriving payment system design from scratch mid-interview.

Interview 07

Question Bank: Messaging, Fulfillment & Flash Sales

The order-to-fulfillment event boundary, and the flash-sale stress test.

Q

The order DB commits CONFIRMED, but the event never reaches the broker. What happened, and how do you prevent it?

Strong answer angle

Strong answer direction: a direct publish-after-commit call has a dual-write gap -- the process can crash between the DB commit and the publish. A transactional outbox closes it: the event is written as a durable row in the same transaction as the order state change, and a separate relay publishes it, retrying until acknowledged. What interviewer is testing: recognition of the DB-to-broker dual-write problem as a real correctness gap. Read deeper: Transactional Outbox.

Likely follow-ups
  • Can the outbox relay itself create a duplicate? — Yes -- if it crashes between publishing and marking the row published, it can republish on restart. Consumers must be idempotent regardless.
Q

Fulfillment receives the same order.confirmed event twice. What happens?

Strong answer angle

Strong answer direction: it must not create a duplicate shipment -- a stable business idempotency key (order_id + fulfillment_operation) lets the consumer recognize and no-op the duplicate. What interviewer is testing: whether idempotency is understood as a requirement on every consumer, not just the producer. Read deeper: Event Consumer Idempotency.

Q

The warehouse/fulfillment system goes down for an hour. Does checkout stop?

Strong answer angle

Strong answer direction: no -- orders remain confirmed and paid, new orders continue to be accepted, and the outbox/broker retains fulfillment work durably until the outage resolves. If the outage risks breaching fulfillment SLOs, communicate delay proactively rather than silently. What interviewer is testing: whether async decoupling is actually understood, not just drawn as a queue in the diagram.

Q

100,000 users want 1,000 units of one SKU. Why doesn't scaling the API tier solve this?

Strong answer angle

Strong answer direction: the bottleneck is one storage row/partition for that one SKU, not compute capacity -- every reservation attempt contends on the same row regardless of how many stateless API instances are running. Mitigations include bounded/backoff retry, admission control or a waiting room, and serialized per-SKU processing for extreme contention. What interviewer is testing: whether 'just autoscale' is recognized as insufficient for a storage-level hot key. Read deeper: Flash-Sale Hot-SKU Contention.

Likely follow-ups
  • Does partitioning inventory by SKU help here? — It isolates different SKUs from each other, but it cannot split one indivisible hot SKU without additional design like sub-partitioning the count or a preallocation scheme.
Q

How do you keep 'sold out' from overloading the payment provider during a flash sale?

Strong answer angle

Strong answer direction: fail fast once inventory is exhausted, before the checkout flow reaches the payment step -- this stops doomed checkout attempts from generating unnecessary provider traffic. What interviewer is testing: whether the candidate connects inventory state to upstream traffic shaping, not just downstream error handling.

Interview 08

Question Bank: Consistency & Failure Curveballs

Closing questions that probe whether consistency claims are precise, plus rapid-fire failure curveballs.

Q

Where is stale data acceptable, and where isn't it?

Strong answer angle

Strong answer direction: catalog display, search results, recommendations, analytics, and order-history display can all be eventually consistent. The reservation grant, order-state transitions, and payment identity need guarded, authoritative decisions at the moment they're made. What interviewer is testing: whether 'consistency' is answered with concrete invariants rather than a single blanket label. Read deeper: Trade-offs -> Consistency by Workload.

Q

Can order status be cached?

Strong answer angle

Strong answer direction: a read-only order-status display view can be cached with explicit staleness semantics -- the underlying order-state transition itself must still go through a guarded write, not a cache write.

Q

Curveball: the reservation succeeds, but the confirmation response to the client is lost.

Strong answer angle

Strong answer direction: the client retries with the same checkout idempotency key, and the durable checkout/reservation identity resolves the retry to the existing reservation rather than creating a second one -- this is exactly the case checkout idempotency is designed to make a non-event. Read deeper: Checkout Idempotency.

Q

Curveball: reservation expires while payment is still pending.

Strong answer angle

Strong answer direction: this is exactly the payment-unknown/reservation-expiry edge case -- the system needs a pre-defined policy (extend, or a later-success recovery/refund path) rather than an improvised response. Read deeper: Failure & Scale -> Payment Unknown, Reservation Nearing Expiry.

Q

Curveball: the order confirms, but the outbox publish is delayed for ten minutes.

Strong answer angle

Strong answer direction: outbox-lag monitoring surfaces this; the order is still safely CONFIRMED, and fulfillment simply starts ten minutes later than usual once the relay catches up -- not a correctness issue, an operational lag to watch.

Q

Curveball: the search index shows a product as in stock, but it just sold out.

Strong answer angle

Strong answer direction: no problem -- search is discovery data, not checkout authority. Checkout revalidates current availability regardless of what the (possibly stale) search result showed, and the shopper sees an accurate 'no longer available' message at that point.

Q

Curveball: reconciliation runs twice over the same batch.

Strong answer angle

Strong answer direction: every reconciliation repair uses a stable, idempotent reconciliation/action identity, so a re-run recognizes already-applied repairs as no-ops instead of double-applying them (e.g. double-crediting a refund or re-confirming an already-confirmed order). Read deeper: Order Reconciliation.

Q

Curveball: a customer cancels an order at the exact moment it ships.

Strong answer angle

Strong answer direction: a conditional check against the fulfillment state at the moment of processing (not the state the customer saw when clicking cancel) decides whether cancellation is still valid -- if not, route to the return/refund-after-shipment path instead. Read deeper: Failure & Scale -> Cancellation Races with Shipping.