Inside Stripe Radar: Sub-100ms Real-Time ML Fraud Detection Architecture
How Stripe Radar scores payments in under 100 milliseconds: distributed feature stores, global network graphs, and real-time ensemble inference.
On this page
When a consumer taps “Buy Now” on an online checkout page powered by Stripe, a massive distributed machine learning pipeline fires across multiple global availability zones.
Before the transaction reaches Visa or Mastercard, Stripe’s risk engine, Radar, must evaluate over 1,000 real-time features, query a global network graph spanning hundreds of billions of dollars in historical transactions, execute an ensemble of machine learning models, and decide whether to approve, challenge with 3D Secure, or reject the charge.
The entire process must complete in less than 100 milliseconds.
If the model is too slow, checkout conversions plummet as shoppers abandon sluggish pages. If the model is too lenient, merchants suffer catastrophic chargeback fees and regulatory fines. If the model is too aggressive, legitimate customers are falsely declined.
This article details the low-latency distributed systems architecture behind Stripe Radar: feature extraction pipelines, global fraud graphs, model serving constraints, and precision-recall trade-offs.
The Scale and Imbalance Challenge
Fraud detection in online payments is the ultimate needles-in-a-haystack machine learning problem:
- Extreme Class Imbalance: Fraud represents less than 0.1% of total transaction volume. A naive model that predicts “Legitimate” on every single payment achieves 99.9% accuracy while destroying businesses.
- Asymmetric Loss Matrix: Blocking a legitimate 500-dollar transaction loses 500 dollars in gross revenue and alienates an honest customer forever. Letting a 500-dollar fraudulent charge pass costs 500 dollars in stolen merchandise plus a 15-dollar chargeback fine.
- Active Adversaries: Fraud rings continuously rotate IP ranges, test stolen credit card numbers in micro-bursts, and spoof browser hardware fingerprints.
The 100ms Latency Budget
To maintain an unyielding 100-millisecond SLA, the Radar engineering team enforces strict time allocation across the request lifecycle:
[ Inbound TLS & Routing ] ─────────► 15 ms
[ Feature Store Extraction ] ───────► 25 ms (Parallelized across clusters)
[ Model Inference Execution ] ─────► 20 ms (Optimized C++ runtime)
[ Custom Merchant Rules ] ─────────► 10 ms (Rule engine evaluation)
[ Network Buffer & Safety Margin ] ─► 30 ms
─────────────────────────────────────────────
Total Latency Budget: 100 ms
If any service down the chain fails to respond within its allocated window, Radar employs a calibrated fail-safe degradation mode, falling back to cached offline risk profiles and essential heuristic checks rather than dropping the transaction or blocking checkout.
1. The Distributed Feature Store
Raw payment parameters (amount, currency, card bin) contain limited predictive signal. The true power of Radar stems from aggregated velocity and network graph features:
- Has this device fingerprint been seen across 15 different merchants in the last 2 hours?
- Is this email domain associated with a spike in chargebacks in Germany over the last 15 minutes?
- What is the ratio between this customer’s transaction amount and their average purchase size over the past 90 days?
Real-Time In-Memory Aggregations
To compute these answers in under 25 milliseconds, Stripe maintains a distributed, in-memory feature caching layer (leveraging partitioned Redis and high-throughput key-value clusters).
Transactions stream through Apache Kafka and Apache Flink, continuously updating sliding-window sliding counters (10-minute, 1-hour, 24-hour, and 30-day windows). When a new payment arrives, the worker fetches pre-aggregated velocity states via parallel multi-key lookups.
2. The Global Network Graph
Individual merchants only see their own customer history. A small boutique selling electronics has no way of knowing that a credit card entered on their site was tested thirty seconds earlier on five other retail sites in Canada.
Because Stripe processes transactions for millions of businesses globally, Radar constructs a global network graph:
- When a card appears, Radar links it to associated billing addresses, IP subnets, browser canvas fingerprints, and email clusters.
- If a card number is marked stolen by an issuer in Japan, Radar instantly propagates that fraud signal across every merchant in the global Stripe network within seconds.
3. Real-Time Model Inference
Radar does not rely on a single monolithic model. It deploys an ensemble combining:
- Gradient Boosted Decision Trees (LightGBM/XGBoost): Highly optimized for tabular and categorical features (card country, merchant category, velocity counts). Extremely fast CPU execution (sub-5ms).
- Deep Neural Network Embeddings: Encodes high-cardinality entities (device fingerprints, merchant vectors) into low-dimensional latent spaces, capturing non-linear interactions across the global graph.
The ensemble outputs a continuous probability score from 0 to 100 representing fraud likelihood.
Merchants can configure custom threshold gates:
- Score < 65: Automatically approve transaction.
- Score 65 to 84: Trigger dynamic 3D Secure authentication (sending a verification code to the customer’s phone).
- Score ≥ 85: Automatically decline transaction.
Key Lessons for Real-Time ML Engineering
- Feature Freshness Trumps Model Complexity: A simple tree model fed with 1-minute real-time velocity features will consistently outperform a complex deep neural net fed with stale 24-hour batch features.
- Parallelize Everything: Extracting 1,000 features sequentially is impossible within 25 milliseconds. Group features into independent asynchronous queries fired concurrently.
- Always Architect for Graceful Degradation: When distributed caches experience network jitter, your fallback pipeline must maintain security without halting revenue flow.


/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.