What is a load balancer?
A load balancer distributes incoming network traffic across multiple servers to ensure no single server is overwhelmed. It improves availability, reliability, and throughput.
What are common load balancing algorithms?
Round Robin (sequential distribution), Least Connections (routes to server with fewest active connections), IP Hash (consistent routing based on client IP), Weighted Round Robin (considers server capacity).
What is the difference between Layer 4 and Layer 7 load balancing?
Layer 4 (Transport) operates on TCP/UDP level using IP and port. Layer 7 (Application) operates on HTTP level, allowing content-based routing using URLs, headers, and cookies.
What is health checking in load balancers?
Health checks are periodic tests to verify server availability. The load balancer stops sending traffic to unhealthy servers. Checks can be active (probing) or passive (monitoring responses).
What is sticky session (session affinity)?
Sticky sessions route all requests from a user to the same server. It’s useful for maintaining session state but can create uneven load distribution and single points of failure.
What is DNS load balancing?
DNS load balancing returns different IP addresses for the same domain name to distribute traffic. It’s simple but has limitations like DNS caching and no health checking.
What is a reverse proxy?
A reverse proxy sits between clients and servers, forwarding client requests to appropriate servers. It can perform load balancing, caching, SSL termination, and security functions.
What is horizontal scaling vs load balancing?
Horizontal scaling adds more servers to handle load. Load balancing distributes traffic across those servers. They work together: scaling provides capacity, balancing distributes work.
What are the benefits of load balancing?
Benefits include: increased availability (failover), improved performance (parallel processing), horizontal scalability, maintenance flexibility, and better resource utilization.
What is SSL/TLS termination?
SSL termination decrypts HTTPS traffic at the load balancer, sending unencrypted traffic to backend servers. It reduces CPU load on application servers but requires secure internal network.