After enabling a service mesh, latency went up by 15ms per hop. Is that acceptable and what can you do?
AdvancedScenarioScaling and performance
Answer
Situation read → Sidecar proxies add two extra hops per call. A few ms is expected; 15ms per hop suggests misconfiguration or starved proxies.
What I'd do →
- Measure precisely: compare proxy-reported upstream time with app time to isolate proxy overhead.
- Check sidecar resources: CPU-throttled Envoy proxies add latency. Give them proper requests.
- Check mTLS handshakes on every request (connection reuse disabled) and access logging at high volume.
- Reduce config size with
Sidecarresources in Istio so each proxy only knows about the services it calls. - Consider ambient mode (ztunnel) or Cilium's sidecar-less approach if per-hop overhead matters for deep call chains.
Why → Overhead multiplies with call depth; 15ms × 6 hops is 90ms on a user request.
Interview tip → Ask "what do we need the mesh for?" A mesh adopted only for mTLS might be replaceable by something cheaper.
More on Scaling and performance
Traffic is expected to 10x for a sale next week. How do you prepare the platform?IntermediateThe HPA is configured but pods don't scale even though the app is slow. Why?BeginnerPods are Pending during a traffic spike because the cluster is out of capacity. What do you do now and long term?IntermediateThe database CPU is at 95% and the API is timing out. What's your approach?Intermediate"Too many connections" errors from Postgres after scaling the app out. How do you fix it?IntermediateLatency is fine on average but p99 is terrible. Where do you look?Advanced