HLD-234·Messaging & Queues
Medium · 1,000 ptsReal-Time Stock & Crypto Price Threshold Alert Matcher
Design Robinhood / Coinbase’s price-alert engine matching millions of user limit-threshold rules against live market ticks without duplicate alert spam.
Max p99
≤ 48 ms
Availability
≥ 99.5%
Budget
≤ $5,550
Functional Requirements
- FR-1POST /alerts — Registers or cancels a user price threshold rule keyed by ticker_symbol.
- FR-2GET /alerts/{ticker_symbol}/active — Evaluates sorted threshold buckets on incoming price ticks.
- FR-3PATCH & DELETE /alerts/{ticker_symbol} — Updates, cancels, or deletes ticker_symbol records and immediately invalidates or updates cached state (read-after-write).
- FR-4Must absorb FOMC volatility tick storms and survive primary storage crashes.
Workload Profile
Regular Market Hours30,000 Rule Match Read RPS / 5,500 Rule/Trigger Write RPS
Fed Rate Volatility Spike86,000 Read RPS / 18,000 Trigger Write RPS
Active Working Set20 GB price-ordered range buckets per ticker
Traffic DistributionExtreme skew on BTC, ETH, NVDA, SPY ticker_symbol keys
Consistency Model
Read-after-write on alert cancellation/firing state so triggered alerts fire once and cancelled rules stop immediately.
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