Skip to main content

Why are long-lived connections tricky behind Kubernetes Services?

Expert Kubernetes
Quick Answer HTTP/1.1 long-lived connections (WebSocket, gRPC streams, database persistent connections) don't benefit from Service load balancing because one connection goes to one Pod and stays there. All requests on that connection hit the same Pod รขโ‚ฌโ€ no load balancing. Use a service mesh (Istio, Linkerd) for request-level load balancing of persistent connections.

Answer

Established connections bypass load balancing, causing backend imbalance.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice