Question
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.
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.