How do gRPC and HTTP/2 interact with load balancers?
AdvancedConceptHTTP, TLS & Certificates
Answer
gRPC uses HTTP/2 with long-lived multiplexed connections, so an L4 balancer spreads connections, not requests, and one busy client can pin all traffic to one backend. You need an L7 balancer that understands HTTP/2 (ALB with gRPC target groups, Envoy, nginx grpc_pass) or client-side load balancing.
In Kubernetes a plain ClusterIP Service gives poor gRPC distribution, so use a headless Service with client balancing or a mesh.
More on HTTP, TLS & Certificates
What is the structure of an HTTP request and response?BeginnerWhich HTTP status code classes and codes should every DevOps engineer know?BeginnerWhat are the common HTTP methods and which are idempotent?BeginnerWhat changed between HTTP/1.1, HTTP/2 and HTTP/3?IntermediateHow does QUIC differ from TCP+TLS?AdvancedWhat are HTTP keep-alive and connection reuse, and why do they matter?Advanced