Code RoomReal-time fraud scoring at scale
HardPrep Room Coding #3833

Real-time fraud scoring at scale

System designML systemsDistributed systemsSenior–Staff~45 min

Design a real-time fraud-scoring system for a payments processor handling 8,000 card authorizations/sec at peak. Each authorization must return an approve/decline/review decision within a 50ms p99 budget (the issuer network times out the auth at ~150ms total), and the score must reflect very recent signals — e.g. velocity of attempts on the same card or device in the last 60 seconds. The model is a gradient-boosted tree plus a few hundred features; some features are precomputed (account age, historical chargeback rate) and some must be computed on the hot path (counts/aggregations over the last seconds-to-minutes). False declines are expensive (lost legit revenue and customer anger) and false approves cause direct fraud loss, so the threshold is tunable per merchant segment.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.