HLD-401·Transactions & Locking
Expert · 2,000 ptsLow-Latency Equity Order Gateway & Risk Pre-Check
Design a brokerage order-entry and buying-power pre-check engine handling market-open volatility bursts with strict per-account margin locking and symbol sequencing.
Max p99
≤ 90 ms
Availability
≥ 99.5%
Budget
≤ $8,400
Functional Requirements
- FR-1POST /orders/{symbol} — Atomically validates/reserves account buying power and sequences limit order.
- FR-2GET /quotes/{symbol} — Serves top-of-book quote snapshot and open order status.
- FR-3DELETE /orders/{symbol} — Releases canceled or expired leases/holds atomically and immediately refreshes cached availability.
- FR-4Zero margin overdrafts or lost accepted orders when a primary database/state node crashes.
Workload Profile
Pre-Market Load60,000 Quote Read RPS / 12,000 Order Write RPS
Opening Bell Surge160,000 Read RPS / 40,000 Concurrent Order Write RPS
Active Working Set30 GB hot symbol books & active margin balances
Contention ProfileExtreme skew on volatile flagship ticker symbols
Consistency Model
Strict serializable buying-power reservation + sequenced partition log + RPO = 0 synchronous/quorum replication.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words