How a fraud decision runs in under 200 milliseconds
A real-time decision is a chain of small budgets. This article follows one request through signal collection, feature freshness, rules, model scoring, and the final response.
A fraud decision is a promise you make to the checkout flow: give me the request, and I will tell you whether to trust it before the customer notices you asked. On the platform I run, that promise is 200 milliseconds, and inside it we evaluate more than 200 risk signals. This post is about where those milliseconds actually go.
1. The budget comes first#
Latency work usually starts at the end, with profiling, after the system is already slow. Decisioning cannot work that way, because every team that touches the request wants a slice of the budget. So we allocate it up front. Signal collection gets a slice. Feature assembly gets a slice. Rules and model scoring get theirs. Serialization and the network get what is left, and we keep a reserve, because production always has a opinion about your plans.
When a slice overruns, that is a design conversation, not an optimization ticket. Either the work moves out of the request path, or its budget is renegotiated against another slice.
2. Most signals are already computed#
The cheapest signal is the one you never compute during the request. Device history, account age, velocity counters, and behavioral aggregates change on their own schedule, so we maintain them continuously as events stream in, and the decision reads the current values.
That leaves the request path with the signals that are only true right now: this device, this network, this transaction, this moment. Those are the ones worth spending latency on, and there are fewer of them than people expect.
A real-time decision is mostly a read of work you did earlier, plus a small amount of work only this request can do.
3. Freshness is a per-feature decision#
Not every feature deserves the same freshness. A counter of failed logins in the last ten minutes must be close to real time or it lies. A customer's tenure in months can be an hour old and lose nothing. We set freshness per feature, and we measure the actual age at decision time. When a feature arrives stale, the decision knows it and can weigh that signal less, instead of quietly trusting old data.
4. Rules before models#
Rules run first because they are fast, explainable, and absolute. A confirmed stolen card or a known-bad device should end the conversation without asking a model for an opinion. Models then score what is left, the genuinely ambiguous middle, which is where they earn their keep.
This ordering also helps the humans. When a decision is challenged, the answer starts with the rule or the top contributing signals, not with a probability nobody can explain.
5. The response is not the end#
A decision returns allow, review, or block with reason codes, and the event, the exact feature values, and the outcome go back into the stream. That feedback loop is how accuracy improved to 98.6 percent on our platform: analysts review outcomes, labels come back, and both rules and models get corrected by reality.
If you are building something similar, start with the budget, keep the request path boring, and treat every millisecond as spent money. The clever parts of fraud engineering are rarely in the decision itself. They are in everything you arranged so the decision could be simple.
