kubernetes-networking-load-balancing

Contents

Roadmap info from roadmap website

Load Balancing

Load balancing in distributes network traffic across multiple pods or nodes using a Service object. A Service provides a stable network endpoint for a set of pods, allowing other pods or external clients to access them through a single IP address and DNS name. Kubernetes offers three types of load balancing algorithms for Services, which distribute traffic based on round-robin, least connections, or IP hash. Load balancing is an essential part of Kubernetes networking, providing efficient and reliable traffic distribution across a cluster.

Learn more from the following resources:

AlgorithmRound-RobinLeast ConnectionsIP Hash
FunctionDistributes requests sequentially to each server in order.Routes requests to the server with the fewest active connections.Distributes requests based on the hash of the client’s IP address.
Use CaseBest for evenly distributing load across servers with similar performance.Ideal when server load can vary or some servers handle connections faster.Useful when session persistence is needed (sticky sessions).
Balancing MethodCycles through servers in a fixed order, regardless of their current load.Prioritizes servers that have less load by connection count.Maps requests from the same client IP to the same server.
AdvantagesSimple and efficient in environments with similar servers.Ensures better load distribution when servers have unequal workloads.Guarantees the same client is always routed to the same server.
DisadvantagesDoesn’t account for varying server loads or connection speeds.Can lead to imbalanced routing in case of long-lived connections.Less effective when traffic is unevenly distributed by IP or if one server gets disproportionate requests.
ScalabilityScalable but less optimal for dynamic environments.More scalable for environments with fluctuating workloads.Scalable for environments that need session persistence.
ComplexityVery simple to implement.Slightly more complex, requiring tracking of active connections.Requires hash calculation and IP tracking for consistency.
#roadmap #kubernetes #kubernetes-networking #ready #online