Q9: What is a load balancer, and how does it distribute traffic?

Difficulty:EasyTopic:Networking

A load balancer routes incoming requests across healthy backend instances. Common strategies include round robin, least connections, weighted routing, and consistent hashing. It may terminate TLS, perform health checks, and enforce connection limits. Layer 4 balancing uses transport-level information; Layer 7 balancing can route based on HTTP paths, headers, or hostnames. Health checks should avoid declaring overloaded but live systems healthy indefinitely.

Key Takeaways
  • Load balancers distribute traffic and remove unhealthy targets.
  • Choose routing based on workload and session requirements.