Glossary termNetwork component

Load Balancer

Device or software that distributes incoming network traffic across multiple servers to improve capacity, responsiveness and availability.

A load balancer sits between clients and a group of servers, often called a pool or backend, and decides which server should handle each incoming connection or request. By spreading work across many machines, it allows a service to handle more traffic than any single server could, and by routing around servers that fail health checks, it keeps the service available when individual machines go down. Load balancers are a basic building block of horizontal scaling and high availability designs, from small web applications to global platforms.

Load balancers are often classified by the network layer at which they operate. Layer 4 balancers make decisions using transport information such as IP addresses and ports, forwarding connections without inspecting their content. Layer 7 balancers understand application protocols such as HTTP, so they can route requests by URL path or header, terminate TLS and add caching. Distribution algorithms include round robin, least connections, weighted schemes and hashing on the client address to keep a user on the same server. Implementations range from dedicated hardware appliances to software such as HAProxy and NGINX and managed cloud services.

Traffic can also be balanced at larger scales. DNS-based methods return different server addresses to different clients, and anycast routing directs users to the nearest of several sites advertising the same address, techniques widely used by content delivery networks. A load balancer can itself become a single point of failure, so production deployments usually run them in redundant pairs or clusters. Because they see all incoming traffic, load balancers are also natural places to enforce rate limits and absorb some kinds of denial-of-service attacks.

Key points

  • Load balancers spread requests across servers and stop sending traffic to servers that fail health checks.
  • Layer 4 balancers route by address and port; layer 7 balancers can inspect HTTP requests.
  • Common algorithms include round robin, least connections and hashing on client addresses.
  • Load balancers are usually deployed redundantly so that they do not become single points of failure.

Related entries

Glossary term

Reverse Proxy

DevOpsCybersecurity

Server that sits in front of one or more backend servers, receiving client requests on their behalf and forwarding them to the right destination.

Glossary term

Increasing a system's capacity by adding more machines or instances that share the work, rather than making a single machine more powerful.

Glossary term

Design goal and set of techniques for keeping a system operational and accessible for an agreed, very high proportion of time.

Technology

NGINX

DevOpsFOSS

Free and open-source web server, reverse proxy and load balancer built on an event-driven design that handles many concurrent connections efficiently.

Glossary term

Geographically distributed network of servers that caches and delivers web content from locations close to users to improve speed and reliability.

Glossary term

Infrastructure layer that manages communication between microservices, handling routing, encryption, retries and telemetry outside application code.

Glossary term

Attack that makes a service, website or network unavailable to legitimate users, typically by overwhelming it with traffic or requests.

Referenced by

Other entries that discuss or point to Load Balancer.