End-to-End Architecture Case Study
One fraud-scoring platform, all planes wired together
In practice, production ML means wiring every plane together into one operating system. This case study walks an end-to-end platform for fraud scoring — data, training, registry, serving, monitoring — and the incident-driving design decisions behind it.
What you will learn
- Trace a full prediction from event to log across every plane
- Justify each architectural decision against cost, latency and reliability
- Design the monitoring and rollback story for a real-time product
What is this?
This case study assembles a production platform: a payment network scoring every transaction for fraud within 150ms. It connects the data plane (streamed events, labeled windows), training plane (nightly pipeline on snapshot data), registry (gated promotions), serving plane (real-time scoring with batching), and monitoring plane (drift, outcome lag labels, proxy metrics) into one story you can steal decisions from.
Why do you need it?
- Fragments hide integration cost; a full trace shows where the platform actually earns its complexity.
- Real constraints — latency, label lag, cost — force the design decisions blueprints don't spell out.
- A worked company-shaped example is the fastest way to internalize the planes and their interfaces.
- The case study doubles as a blueprint for building and as a source of interview answers.
Mental model
Air traffic control
A production ML platform
Every flight has a flight plan (training), is tracked live on radar (monitoring), rerouted when weather shifts (drift response), and rejected at the gate if the plane isn't cleared (registry gates).
How it works
- Data plane: Kafka streams each transaction; labeled outcomes arrive on a 24h lag; a snapshot dataset is versioned nightly for training.
- Training plane: a nightly Airflow/KFP pipeline trains an XGBoost model on the latest snapshot, evaluates against the current validation window, and compares to the incumbent in the registry.
- Registry + governance: candidates are registered with metrics and lineage; a quality gate plus a human-on-pager review promotes the winner to the 'champion' alias.
- Serving plane: an API fetches customer/merchant features from the online store, dynamic-batches requests into the model server, and returns a fraud score with reasoned metadata within the 150ms budget.
- Monitoring plane: data-quality checks on inputs, drift alerts on feature distributions, proxy metrics (suspicious-approval rate), and outcome-lag reconciliation against charged-back labels.
The fraud-scoring platform's planes wired end-to-end.
In production
- The champion model's alias lets serving stay constant while training promotes new versions — deployment is one alias flip with a canary window.
- Batching at the model server keeps GPU cost per transaction low, and the exporter-side latency budgets drive the batching limits.
- When feature drift trips on merchant categories, the monitoring plane pages the model owner and shadows the champion against the drifted data before any promotion.
Best practices
- Separate 'training data freshness' from 'serving feature freshness' in the SLA; they update on different cadences by design.
- Alias the champion: services depend on 'champion', not a version string, so promotion is atomic.
- Instrument outages and rollbacks as first-class events in the same monitoring plane as drift.
- Reconcile outcome-lag metrics: chargebacks arriving late must update earlier optimistic proxy numbers.
Common mistakes
- Training on a snapshot while serving on fresh features — the classic skew tripping even a perfect pipeline.
- No champion/alias indirection, so every promotion is a code change in the serving tier.
- Monitoring live quality before outcome labels arrive, then never reconciling — the dashboards lie forever.
Common issues
Lagged chargeback labels aren't reflected anywhereNo outcome reconciliation job; proxy metrics were never corrected
Schedule a reconciliation that joins scored transactions against settled/charged-back outcomes and recomputes realized quality.
Promoting a model breaks the serving API contractThe candidate's signature diverged from the serving schema
Enforce the model signature (input/output schema) at registry registration and gate promotion on a serving-contract test.
Debugging tips
- When live scores degrade, diff the serving-feature distributions against the training snapshot first.
- In latency incidents, trace the request — feature fetch is the usual suspect, not the model.
- Verify the reconciliation job ran; a charged-back label backlog silently invalidates your quality dashboards.
Interview checkpoint
Hands-on lab
- Simulate every plane with small Python modules
- Trace one transaction event through data → training → registry → serving → monitoring
- Detect a drift signal from the trace and trigger a shadow-to-promote flow
Trace a Request Through the Whole Platform
40 min · advanced
Quick quiz
Why would a platform serve the 'champion' alias instead of a model version string?
Live quality dashboards can be trusted before outcome labels get reconciled.