Design a Machine Learning Feature Store
Serve versioned machine-learning features online and build point-in-time-correct training datasets from the same governed definitions.
Problem statement
For this exercise, assume data teams register versioned feature definitions over batch tables and event streams. Applications request fresh online values for named entities, while training jobs request historical feature values as of each label time without future leakage.
The platform validates schemas, tracks source and transformation lineage, supports late events and corrections, materializes compatible definitions into offline and online stores, exposes freshness and version metadata, and promotes serving releases only after coverage and online/offline parity checks.
For this exercise, also compare feature-value distributions for a declared population and time window under an exact feature version and reference profile; a shift is evidence to investigate, not an automatic corruption verdict.
Enforce owner-configured allowed-use policies and current authorization for ingestion, materialization and backfill, online reads, and training-dataset use, returning explicit denied outcomes with inspectable decision evidence.
Design the registry, ingestion, transformation, offline history, online serving, point-in-time dataset generation, release, observability, and recovery paths. Model training, experimentation orchestration, and a general-purpose data warehouse are outside scope.
What to build
- Register immutable feature-definition versions with schemas, entity keys, transformations, owners, and source lineage. Retain the declared allowed-use policy and enforce it with current authorization on feature use.
- Ingest batch and streaming source revisions idempotently and materialize versioned feature values.
- Serve low-latency online feature vectors with exact version and freshness metadata.
- Build reproducible point-in-time-correct training datasets that never include feature values after a row's label time.
- Backfill, correct, validate, promote, roll back, and reconcile materializations without rewriting prior snapshots. Include comparable feature-value distribution diagnostics and inspectable quality and allowed-use decisions in monitoring and recovery.
At scale
- Assume 10,000 active feature definitions, 10 million source events per second at peak, and 200,000 online read requests per second.
- Online reads should finish within 20 ms p95; each definition declares a measurable freshness objective from one minute to 24 hours.
- Retain seven years of source-revision and feature-lineage evidence and make every retained training snapshot reproducible.
- A duplicate event, worker retry, late correction, backfill, or release timeout cannot silently change a snapshot or expose a partially materialized serving release.