Scale online predictions within a latency budget
Separate feature retrieval, inference time and queueing when sizing a serving endpoint.
Scale online predictions within a latency budget
Work through the decision
A checkout model takes 18 ms to run but p95 response time during lunch is 240 ms. Its feature lookup scans a warehouse table and new replicas start slowly. What should the team measure before adding GPUs?
Check your reasoning
Trace feature retrieval time, queueing, inference and postprocessing separately. Move eligible hot features to an online lookup keyed by entity, test freshness and profile under burst load. Set a minimum ready replica count for sustained traffic and an upper bound consistent with quota and cost.
Compare the choices
- Online feature retrieval
- Serve current features by entity key with a defined freshness target, missing-value policy and monitored synchronization.
- Private endpoint
- Provide approved private network access when clients may not use a public ingress. Validate routing, identity and authorization separately.
- Minimum warm replicas
- Maintain enough ready capacity for baseline traffic and known spikes. Compare idle cost with the cost of startup delays.
- Autoscaling and load tests
- Set scaling signals, min/max bounds and quotas using representative traffic. Measure tail latency and errors during ramp-up and recovery.
- Inference optimization
- Profile computation, then benchmark compatible quantization, batching or faster hardware with accuracy and latency guardrails.
Test the decision
Choose private connectivity when consumers must stay on approved internal paths. For CPU, GPU, a supported TPU runtime or edge serving, benchmark the actual export, batch size and hardware availability. A larger offline tuning budget can improve quality without fixing an online queue.
Practice the guide skills
- Measure lookup latency and freshness for an online feature view. Define what the service does when a key is absent or stale. Watch 1:44:33
- Draw the route for an authorized internal client to a private endpoint. Check how a public endpoint changes reachability and access controls. Watch 1:43:58
- Benchmark a compatible CPU, GPU, TPU-backed configuration or edge device against the actual latency, data locality and model constraints. Watch 1:45:43
- Load-test ramp-up with minimum and maximum replica counts, initialization time and quota limits. Inspect p95 during recovery. Watch 1:45:57
- Separate the validation objective used to tune training hyperparameters from a serving benchmark for precision, batching, latency and cost. Watch 1:14:10 · Continue at 1:47:01
Official objectives for this lesson
Related lesson · Protect a critical query from competing jobs
Scale online predictions within a latency budget quiz
Answer 3 questions. Check each answer for an explanation.