Container & Kubernetes Load Balancing 00:00:01 Find the entrance to an otherwise ordinary pod A service has three interchangeable pods. Start with an internal virtual address and work outward through node exposure, provider integration and a gateway that can route by application path. Only pods inside can call it. The address is virtual: no machine owns it. Every node listens on port 30080 and passes the connection to the Service. The cloud creates a balancer that knows the healthy nodes. Gateway pods read host and path and choose the Service. One entrance for many. Service type, implementation and cluster configuration determine the real forwarding path. A virtual Service address is a stable discovery point while pod addresses change. 00:00:47 A restarted process is not ready yet Three equal ready pods share nine hundred new connections. Remove one, then start its replacement. Predict when the replacement should become eligible to receive traffic. Of 900 connections each gets about 300: 33.3%. Its address leaves the list. The next 900 go to the other two. It runs, with a new address, but its probe still fails. No traffic. The probe succeeds, the address joins the list and the share returns to a third. Readiness influences endpoint eligibility. Existing established connections and propagation delays can make observed traffic look different from an immediate perfect redistribution of fresh connections. 00:01:33 Two thirds times one half Follow a simplified three-endpoint probabilistic forwarding chain. The first rule catches one connection in three. What conditional probability gives the second endpoint the same overall share? It fires for one connection in three. Two thirds reach it and half of them stop: one third of all. Whatever is left goes here. Again one third. The rules are rewritten for two pods: 1 divided by 2 and the rest. Half of the remaining two thirds equals one third of the original traffic. These rules describe one implementation pattern, while other kube-proxy modes and data planes select endpoints differently. 00:02:18 Let the retiring pod finish its orders During rollout, one node learns about the retiring pod later than another. Compare exiting immediately with stopping new work after routing updates propagate and allowing in-flight work to finish. Both pods get traffic. The old pod exits at once. Node 2 still sends connections to it: refused. The old pod keeps serving while the news spreads. At second 3 node 2 forgets the pod. It still finishes running requests. The last request ends before second 40 and the pod exits. Bound the termination grace period and make the application drain explicitly. A ready endpoint disappearing from discovery is not proof that every existing connection has finished. 00:03:05 Nine hundred calls on one connection A client multiplexes nine hundred calls a second over one long-lived connection. Add two pods and predict whether a connection-level selector can spread those already-established calls. All 900 requests a second land on pod 1. More pods would be idle as well. The connection stays where it is. A headless Service returns three addresses. The client opens three connections and takes turns. The proxy keeps connections to all pods and picks one for every request. Client-side balancing with multiple endpoints or an application-aware proxy can distribute independent calls. The choice depends on connection reuse, protocol semantics and readiness tracking.