After scaling a gRPC service from 4 to 12 pods, `DEADLINE_EXCEEDED` errors increase and the new pods sit idle.
AdvancedTroubleshooting5xx errors
Answer
Likely causes → gRPC uses long-lived HTTP/2 connections. A Kubernetes ClusterIP Service balances per connection (L4), so existing clients stay pinned to the original 4 pods, which are overloaded, while new pods get nothing.
Diagnose → Per-pod request rate shows a wildly uneven split. kubectl top pods confirms the old pods are hot.
Fix → Use L7 balancing: a service mesh or Envoy, client-side round-robin with a headless Service (clusterIP: None) and dns:/// resolver, or server-side MaxConnectionAge so clients reconnect and spread out.
Prevent → Make L7-aware load balancing the default for gRPC, and dashboard per-pod RPS skew.
More on 5xx errors
Right after a release, 500s spike to 8% and logs show `java.lang.NullPointerException` in a new code path.BeginnerLong-running report exports fail with "504 Gateway Time-out" from the ALB at exactly 60 seconds.Beginnernginx logs "upstream prematurely closed connection while reading response header from upstream" and users get 502.IntermediateEvery deploy causes 10–20 seconds of 502s from the ALB, even with a rolling update.IntermediateA Node.js service behind an ALB returns a steady trickle of 502s under normal load, with no app errors at all.AdvancedThrough Istio, clients get "503 upstream connect error or disconnect/reset before headers. reset reason: connection failure".Intermediate