Code Room
System designHardsd-g382
Subject Fraud detectionLevel Senior–Staff~45 minCommon in ML systems interviewsIndustries Technology, Software development

Question

Design the feature store behind a real-time fraud model scoring inline in the auth path. The model needs velocity/aggregate features (e.g. 'distinct cards used by this device in the last 24h', 'sum of amounts for this user in the last 1h') computed over streaming events, served at <10ms p99 to the scorer, AND computed identically offline for training. ~20,000 auths/sec. The hard part is that the feature the model trained on and the feature served at decision time must be the same value, or the model silently degrades. How do you build it?

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.