Load balancers distribute incoming network traffic to a group of backend servers. They fall into three categories:

  • DNS Round Robin (rarely used): clients get a randomly-ordered list of IP addresses.
    • pros: easily to implements and usually free.
    • cons: hard to control and not quite responsive because DNS cache takes time to expire.
  • L4 Network layer Load Balancer: traffic is routed by IP address and port, L3 is the network layer (IP), L4 is the transport layer (TCP):
    • pros: better granularity, simple, responsive, e.g. forward traffic based on the port
    • cons: content-agnostic: cannot route traffic by the content of data.
  • L7 Application layer Load Balancer: traffic is routed by what is inside the HTTP protocol. L7 is the application layer (HTTP). L7 Application Load Balancer