Skip to content
IT glossary
DevOps and cloudUpdated December 3, 2026

Load balancer

Балансировщик нагрузки

A network component that spreads incoming requests or connections across multiple servers. Clients use one address, and the component decides which server handles their traffic.

Also known as: балансировка нагрузки

Why put one in front of a service?

Imagine an API running on three servers. Instead of asking every client to keep track of those servers, you give clients one endpoint. The load balancer behind that endpoint sends traffic to the servers in its backend pool. You can add a fourth server or take one out for maintenance without asking clients to change the address they use. The load balancer is the component; load balancing is what it does.

How does it pick a backend?

A load balancer can run active health checks, such as polling an HTTP readiness endpoint. After a configured number of failures, it typically stops selecting that backend for new traffic. A useful readiness check tells you whether the instance can serve requests, not just whether its process is running.

  • Round robin takes turns among eligible backends. It's a reasonable starting point when servers have similar capacity and requests take roughly the same amount of work.
  • Weighted round robin selects higher-weight backends more often. For example, weights of 2 and 1 give one backend roughly twice as many selections as the other over time, not necessarily twice as much CPU work.
  • Least connections favors the backend with the fewest active connections. This can help when connections stay open for different lengths of time, but connection count is only a proxy for load.

Connection or request? That's the L4/L7 distinction

A Layer 4 balancer works at the transport layer. It can pick a backend for a TCP connection using addresses and ports without inspecting the HTTP messages inside it. If a client reuses that connection for a hundred requests, those requests don't get a hundred separate routing decisions at Layer 4.

A Layer 7 balancer understands an application protocol. For example, it can send /api requests to application servers and /images requests to image servers. To route by the path of an HTTPS request, it can terminate TLS to read the HTTP request, then use a separate encrypted connection to the backend if required.

Where it fits and what it doesn't solve

Load balancers sit in front of public websites and APIs, and they also distribute traffic between internal services. An HTTP reverse proxy such as Nginx can perform load balancing, but a reverse proxy that always forwards to one server isn't balancing anything.

If an app keeps login sessions only in local memory, a request routed to another instance may not find the session. Sticky sessions keep a client on the same instance while it is available; they don't preserve the session if that instance fails. A shared session store lets another instance pick up subsequent requests.

What interviewers look for

Walk through a failure rather than just naming an algorithm. Explain how a dead backend stops receiving new traffic, what happens to in-flight work, and whether the remaining replicas have enough capacity. Also check the entry point itself: one balancer in front of several redundant servers can still be a single point of failure.