L

Load Balancer

A device or software that distributes network traffic across multiple servers to ensure high availability, reliability, and optimal resource utilization.

What is a Load Balancer?

A load balancer distributes incoming network traffic across multiple backend servers. This distribution ensures no single server bears too much demand, improving application availability, responsiveness, and fault tolerance.

How Load Balancing Works

Load balancers sit between clients and servers, receiving requests and directing them based on configured algorithms. They monitor server health, removing unhealthy servers from the pool and returning them when recovered.

Load Balancing Algorithms

  • Round Robin: Requests distributed sequentially
  • Least Connections: Directs to server with fewest active connections
  • IP Hash: Same client IP always goes to same server
  • Weighted: Servers receive traffic proportional to assigned weights
  • Least Response Time: Chooses fastest responding server

Types of Load Balancers

  • Layer 4 (Transport): Routes based on IP and TCP/UDP ports
  • Layer 7 (Application): Routes based on content (URLs, headers, cookies)
  • Hardware: Dedicated appliances
  • Software: Applications like HAProxy, Nginx
  • Cloud: AWS ALB, Azure Load Balancer, GCP Load Balancing

Benefits

  • High availability through redundancy
  • Scalability by adding servers
  • Flexibility for maintenance windows
  • SSL termination offloading
  • Global server load balancing (GSLB)