Network latency in ML serving — how much matters?
mediumAnswer
- Total latency = client → LB → service → feature fetch → model → response.
- Model inference often only 30-50% of total.
- Preprocess, feature store fetch, network hops dominate.
- Optimize: (1) co-locate feature store with model (same AZ / region).
- (2) precompute + cache features hot path.
- (3) HTTP/2 or gRPC keep-alive (reduce connection setup).
- (4) Nagle's for small payloads.
- (5) Client-side connection pooling.
- (6) Serverless has extra hop cost.
- Profile every hop.
Check yourself — multiple choice
- Random
- Total = client → LB → svc → feature fetch → model → resp; model often 30-50% only; optimize: co-locate FS + cache + HTTP/2 pooling; profile every hop
- Just model
- Not real
Network latency: co-locate FS + cache + HTTP/2 + pool; profile hops.
#infrastructure#serving
Practise MLOps & Data Quality
215 interview questions in this topic.