<p>As we know, by default HTTP 1.1 uses persistent connections which is a long-lived connection. For any service in <a href="https://kubernetes.io/" rel="nofollow noreferrer">Kubernetes</a>, for example, clusterIP mode, it is L4 based load balancer.</p>
<p>Suppose I have a service which is running a web server, this service contains 3 pods, I am wondering whether HTTP/1.1 requests can be distributed to 3 pods?</p>
<p>Could anybody help clarify it?</p>

<p>This webpage perfectly address your question: <a href="https://learnk8s.io/kubernetes-long-lived-connections" rel="nofollow noreferrer">https://learnk8s.io/kubernetes-long-lived-connections</a></p>
<p>In the spirit of StackOverflow, let me summarize the webpage here:</p>
<ol>
<li><p>TLDR: Kubernetes doesn't load balance long-lived connections, and some Pods might receive more requests than others.</p>
</li>
<li><p>Kubernetes Services do not exist. There's no process listening on the IP address and port of a Service.</p>
</li>
<li><p>The Service IP address is used only as a placeholder that will be translated by iptables rules into the IP addresses of one of the destination pods using cleverly crafted randomization.</p>
</li>
<li><p>Any connections from clients (regardless from inside or outside cluster) are established directly with the Pods, hence for an HTTP 1.1 persistent connection, the connection will be maintained between the client to a specific Pod until it is closed by either side.</p>
</li>
<li><p>Thus, all requests that use a single persistent connection will be routed to a single Pod (that is selected by the iptables rule when establishing connection) and not load-balanced to the other Pods.</p>
</li>
</ol>
<p>Additional info:</p>
<p>By W3C RFC2616 (<a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.3" rel="nofollow noreferrer">https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.3</a>), any proxy server that serves between client and server must maintain HTTP 1.1 persistent connections from client to itself and from itself to server.</p>
