Design a Millisecond Online Feature Serving Engine
Last updated: November 29, 2026
Quick Overview
Design the online path of a feature platform: a model sends an entity id and a list of features, and the system must return all values within a p99 of about 10 ms by combining cached values, an online key-value store, and live calls to customer databases and APIs.
Chalk
November 29, 20260
0
0 solved
Design the online path of a feature platform: a model sends an entity id and a list of features, and the system must return all values within a p99 of about 10 ms by combining cached values, an online key-value store, and live calls to customer databases and APIs.
This is the heart of what Chalk sells: real-time context computed at inference time for fraud, underwriting and ranking decisions, running inside the customer's own cloud. The interviewer wants a planner plus executor design, a clear latency budget, a staleness model, and isolation so one slow source cannot sink every request.
What the Interviewer Expects
- Separates planning (resolve the feature graph, choose cache vs compute) from execution
- Builds a latency budget across network, store reads and resolver calls
- Uses per-feature max staleness to decide between cache hits and recomputation
- Runs independent resolvers in parallel with per-source timeouts and fallbacks
- Addresses multi-tenant deployment in customer VPCs and versioned feature definitions
- Covers observability: per-feature latency, null rates and plan traces
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you handle a feature that needs the user's last 1,000 transactions aggregated in real time?
- How do you roll out a new resolver version without changing values for live models pinned to the old one?
- What is your plan for a Postgres source that degrades to 200 ms latency?
- How would you batch requests for 500 candidates in a ranking call?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: query(entity_ids, features, context) returns values, with per-feature errors rather than whole-request failure. Features come from declared resolvers (SQL against Postgres or Snowflake, ...
High-Level Design
- Gateway: auth, tenant routing, branch selection (main or a test branch).
- Planner: compiles requested outputs into a pruned DAG of resolvers using the deployed definitions. Plans are cached...