How the interviewer opens it
“Design an order management system for an online store. Customers place orders, view their progress, and request cancellation before shipment.”
The prompt is vague on purpose. The first minutes are for you. Reduce the prompt to the core features and agree on the numbers before you draw.
What to clarify first
- Scale
- Read and write mix
- Order contents
- Latency
- Correctness and durability
- Repeated placement
- External service behavior
- Stock lifetime
- Cancellation
- Region and exclusions
The interviewer has the answers. In a SysRound round, Alex gives these answers, as a real interviewer does.
Scope of a strong answer
Core requirements
- Place an order without duplicate creation
- Read the current order status
- Coordinate stock, payment, and fulfillment
- Request cancellation and report its final result
Usually out of scope
- Cart, price, tax, and discount calculations
- Payment processor and warehouse internals
- Returns, exchanges, and partial shipments
- Concurrent writes across multiple regions
- Historical archive design
What interviewers ask about
- Repeated requests
- A lost response makes a successful placement look like a failure. Concurrent retries must identify the same order without repeating external effects.
- Order lifecycle correctness
- Several services report independent facts. Late results and concurrent workers must not erase newer decisions or permit invalid order changes.
- Progress across services
- A worker cannot atomically commit an order change and an external effect. Stock can expire while the payment result remains unknown.
- Cancellation and shipment
- The order service cannot stop shipment through a local status change. Fulfillment must settle the race between cancellation and physical dispatch.
Common mistakes
- Treat every order step as one synchronous transaction across all services.
- Prevent duplicate messages but ignore repeated client requests.
- Treat message arrival order as the authority for order status.
- Fulfill an order after its stock reservation expires.
- Report cancellation success before fulfillment guarantees that shipment cannot occur.
- Treat a timeout as failure or assume compensation always succeeds.
The bar by level
- Senior (L5/E5)
- Makes progress durable and closes database-to-queue gaps. Handles concurrent changes, unknown payments, stock expiry, and cancellation races. Defines stock commitment and terminal failure cleanup.
- Staff (L6+/E6+)
- Defines service contracts and identifies promises that those contracts cannot support. Plans backlog recovery and reconciliation within retention limits. Preserves correctness during regional failover.