What is a feature store, what problems does it solve in production ML, and when is it unnecessary?
ML system design, Data and features
Level L2 Elementary. Length Short. Nature Th Theoretical.
What's being asked
Whether you know what a feature store adds beyond an ordinary database or cache, and when a team does not need one.
Key idea
A feature store is one shared definition and catalogue of features used by both training and live serving. It writes the same computed features to an offline store (historical records for training) and an online store (latest values for fast lookup at prediction time), preventing training–serving skew and duplicate work across teams.
Steps
- Explain the shared definition and two stores: each feature is written once in code and saved to an offline historical store (like warehouse tables) for batch training and a fast online key-value store for real-time predictions.
- Prevent training–serving skew (when training and live code compute the same feature differently): using one shared transformation and schema avoids rewriting training SQL (Structured Query Language) a second time in serving code.
- Avoid future leakage and duplicate pipelines: historical records keep timestamps so training reads feature values known before each label's time (point-in-time joins cover the exact mechanics next), while a shared catalogue lets multiple teams reuse features.
- Know when to skip it: a small team with one or two models, or a batch-only pipeline where training and batch scoring read from the same warehouse tables, can do without the extra operational work.
Common mistakes
- Thinking a plain online cache alone is a feature store; without historical snapshots and a shared feature definition, it does not prevent training–serving skew.
- Adding a feature store too early when you only have one model, which slows down early iteration.
- Assuming a feature store fixes broken upstream data feeds automatically without freshness checks.
How long your answer should be
About 2 minutes: architecture, problems solved, and when to skip it.
Read this
Previous in ML system design: When should you choose batch (offline, precomputed) inference over online (real-time) inference, and how do hybrid designs combine the two?
Next in ML system design: Why does pure collaborative filtering fail on cold start, and how do you handle cold start for both new users and new items in a recommender system?