Design Auction System

Hard45 min
1 / 30
understanding6 min read

Auction Marketplace Context

Auction design depth: Auction Marketplace Context (understanding).

Auction Marketplace Context

An online auction is a real-time, write-contended pricing system: sellers list time-boxed lots, buyers compete through ascending bids, and the system must resolve exactly one winning price the instant the clock hits zero. Design it as what it actually is — a per-auction distributed log with a single writer and thousands of readers — and the hard parts fall into place.

What makes auctions different from fixed-price e-commerce is that correctness hinges on three properties retail never has to guarantee. Ordering: bids on one lot form a total order, because 'who bid \$500 first' decides the winner. Monotonic price: the current price only ever moves up, never flickering down under concurrent writers and retries. Exactly-once acceptance: a buyer who taps 'bid' twice on a flaky connection must not become two bidders competing against themselves. eBay, Sotheby's, and Christie's all live or die on these, and interviewers probe the same three failure modes — double winners, last-second snipes, and a bid history that cannot be trusted in a dispute.

The system must also stream price updates to thousands of watchers with sub-second freshness, and that freshness matters most exactly when load is worst: the final seconds before close, when a marquee lot can see a 10x spike in bid rate with 500,000 people watching one item. The read path and the write path hit their peak simultaneously.

The failure that defines the design: two bidders submit \$1,000 within the same millisecond on the last tick, and the auction-end job fires concurrently. Without a single writer per auction and a deterministic close, you can crown two winners or accept a bid after close — both catastrophic, because money and a legal sale hang on the answer. Everything that follows serves to make that moment unambiguous and auditable.

Key Highlights

  • Model each auction as a per-lot distributed log: one writer, many readers
  • Three invariants retail lacks: total bid ordering, monotonic price, exactly-once acceptance
  • Read and write peaks coincide — the final seconds bring a ~10x bid spike and 500K watchers
  • Defining risk: concurrent last-tick bids plus the close job crowning two winners
Signal
State invariants before components—interviewers reward correctness-first framing.
Delivery
Walk through a snipe timeline verbally while drawing the bid log partition.

Section Rescue Kit

Buzzwords to use:

English Auction 1Event Sourcing 1

Safe statements:

  • "I will start with per-auction ordering, then scale reads around it."
  • "If time is short, I will defer multi-currency settlement to v2."
Design Auction System - System Design | WinJob | WinJob