HLDArena
HLD-207·Geo & Telemetry
Medium · 1,000 pts

Live Food Delivery Order & Courier Status

Design an order lifecycle and live courier ETA status backend serving dinner-rush mobile app refreshes with instant state-transition accuracy.

Max p99
≤ 45 ms
Availability
≥ 99.5%
Budget
≤ $4,300

Functional Requirements

  • FR-1PUT /orders/{order_id}/state — Updates kitchen prep, pickup, and courier milestone state.
  • FR-2GET /orders/{order_id} — Polled by hungry customers viewing live order stage and ETA.
  • FR-3PATCH & DELETE /orders/{order_id}/state — Updates, cancels, or deletes order_id records and immediately invalidates or updates cached state (read-after-write).
  • FR-4State transitions (e.g. Picked Up -> Delivered) must be immediately visible without stale cached regressions.

Workload Profile

Baseline Lunch Load34,000 Read RPS / 5,000 State Write RPS
Friday Dinner Peak95,000 Read RPS / 14,000 Write RPS
Active Working Set22 GB active in-flight orders
Fault ScenarioPrimary order database crash mid-rush in Wave 3

Consistency Model

Read-after-write consistency required for order status transitions; automatic replica failover on node crash.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 90 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology