feat: Pre-computed feature vectors for online serving#6463
Merged
Conversation
ntkathole
requested review from
HaoXuAI,
franciscojavierarceo and
shuchu
and removed request for
a team
June 2, 2026 07:31
ntkathole
force-pushed
the
precompute_feature_service
branch
from
June 2, 2026 07:39
6246f28 to
b967bc2
Compare
franciscojavierarceo
approved these changes
Jun 2, 2026
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
ntkathole
force-pushed
the
precompute_feature_service
branch
from
June 2, 2026 13:46
b967bc2 to
d5ed6ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Problem
When a
get_online_features()request spans multiple feature views, the online server issues a separate store read per feature view. For latency-sensitive use cases, we need improvement that cannot be achieved by optimizing the existing read path alone.Fixes #6185
Solution
Introduce pre-computed feature vectors - an opt-in feature (precompute_online=True on FeatureService) that stores all of a service's features for each entity as a single serialized protobuf blob. At read time, the server fetches one blob per entity instead of N reads per feature view, reducing the operation to O(1).
Key design decisions:
Impact
Here are the real numbers from the tuned server (4 CPU, 9 workers), same pod, same run, same service (benchmark_customer_service, 6 FVs, 29 features):