IT Glossary
What is a load balancer and how does it work?
The component that receives every request to a site and splits it across several servers, so none of them is overwhelmed and the site stays available.
- 6
- sections
- 6
- questions answered
A load balancer is a device, a program or a managed cloud service that receives the requests addressed to a site or application and spreads them across several identical servers, sending traffic only to the servers that pass their health checks. It works either at layer 4 (TCP/UDP, by IP and port) or at layer 7 (HTTP, by URL, host or cookie). For traffic from the internet, Kubernetes ships no load balancer of its own: a Service of type LoadBalancer uses the cloud provider's or one you install.
Black Friday, just after midnight: thousands of customers enter the online shop in the same minute, and if everything leans on a single server, that server gives up precisely while you were selling the most. A load balancer does what a supermarket does when it opens extra checkouts the moment a queue forms. When one server fails, the others absorb its share without a customer noticing. For a business that translates directly into money: the site stays available through traffic peaks, maintenance happens without downtime because servers are updated one at a time behind the balancer, and growth is handled by adding machines rather than rewriting the application. It is the component that turns we hope it holds into we know it holds.
Why it matters for your business
Availability at traffic peaks
Marketing campaigns and busy seasons stop knocking the site over — load spreads across several servers and the sales keep going through.
Maintenance without downtime
Servers are updated in turn while the balancer routes traffic to the active ones, so customers never meet the site unavailable page.
Growth by adding, not by rewriting
When the business grows you add servers behind the same balancer — a matter of hours, not a months-long re-architecture project.
How a load balancer works
A load balancer has one public address (an IP or a DNS name) and the servers sit behind it. For each request it picks a server by an algorithm, forwards the request and returns the response to the client. Health checks can be active (a periodic probe, as in AWS target groups) or passive: open source nginx marks a server as failed after max_fails unsuccessful attempts (default 1) and skips it for fail_timeout (default 10 seconds), then tries it again with live requests.
At layer 7 it can also terminate the HTTPS connection instead of the servers. If it keeps a client on the same server (session persistence, or sticky sessions) and is configured badly, a shopping cart can vanish when the client is moved to another server.
Layer 4 vs layer 7 load balancers
Layer 4 (transport) decides only by IP, port and protocol and does not read the content. AWS Network Load Balancer works at this layer and is built for millions of requests per second. Layer 7 (application) reads the request and can route by URL path, host, headers or cookies: that is what AWS Application Load Balancer does. Google Cloud has an Application Load Balancer for HTTP(S) and a Network Load Balancer for TCP, UDP, ESP and ICMP.
The simple rule: an online shop or web application needs layer 7; traffic that is not HTTP (VoIP, game servers, databases) goes on layer 4. On AWS, Elastic Load Balancing is the whole family: Application, Network and Gateway are the current types, and Classic is the previous generation which AWS recommends migrating away from.
Want an estimate for your project?
Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.
Load balancing algorithms: round robin, least connections, IP hash
Static algorithms ignore the state of the servers; dynamic ones take it into account. Round robin sends requests to each server in turn (the default in nginx and in AWS Application Load Balancer), and the weighted variant gives stronger servers more requests. Least connections picks the server with the fewest active connections (least_conn in nginx), and AWS Application Load Balancer offers least outstanding requests. IP hash (ip_hash in nginx) always sends the same client to the same server, which keeps the session.
An nginx example: an upstream group with the least_conn directive and three server lines. The least_time method, which picks the server with the shortest response time, is in open source nginx only since version 1.31.0 (13 May 2026, mainline branch); before that it was part of the commercial subscription, and the 1.30 stable branch does not have it.
Cloud, Kubernetes or self-hosted
There are three options. Managed by the provider: AWS Elastic Load Balancing, Google Cloud Load Balancing or the Azure one, which the provider makes redundant. Software you run yourself: nginx or HAProxy on your own servers. Hardware appliances, such as F5, used mostly in large data centres.
In Kubernetes, a Service of type LoadBalancer creates a balancer only on cloud providers that support it; the Kubernetes documentation says the platform does not directly offer a load balancing component and you must provide one. If you install it yourself, you need two instances with failover so that it does not become the single point of failure.
Frequently asked questions
What does load balancer mean in Romanian?
Load balancer is translated as echilibrator de sarcină, and load balancing as echilibrarea sarcinii (or of the load). There is no established Romanian technical term; documentation and job ads usually use the English one, so it is worth knowing both.
What is the difference between a load balancer and a reverse proxy?
A reverse proxy stands in front of servers and can do caching, TLS and filtering; a load balancer is a reverse proxy whose main job is choosing among several servers. Nginx does both: its documentation describes it as a web server, reverse proxy, content cache and load balancer.
At what traffic level does a load balancer start to make sense?
Average traffic is the wrong measure; what counts is the size of the peaks and the cost of being unavailable. A shop running aggressive campaigns, or an application your staff depend on every working day, justifies one far earlier than a brochure site with steady, moderate visits and no revenue tied to the minute.
How much does a cloud load balancer cost?
It depends on the provider and the traffic. AWS Application Load Balancer is billed per hour plus load balancer capacity units (LCU); the official AWS example (US-East-1, low traffic, 60 rules) comes to 22.42 USD per month, excluding VAT, plus public IPv4. New AWS accounts (created after 15 July 2025) get up to 200 USD in Free Tier credits, usable for Elastic Load Balancing too; the 750 free hours per month were the offer for older accounts. Checked on 18 November 2026 on the AWS pricing page.
What happens if the load balancer itself fails?
Managed cloud services run the balancer redundantly across several availability zones precisely so it does not become the single point of failure. On self-hosted installations the equivalent is two instances configured with failover between them — worth asking any infrastructure provider to describe explicitly before you sign.
Is the load balancer on a router (dual-WAN) the same thing?
No. A router with several WAN ports, such as TP-Link's Load Balance router range, spreads the office's outgoing traffic across two or more internet lines for redundancy. A server load balancer spreads the requests a site receives across several servers.
Let’s talk about your project
Book a free 30-minute call or send us an email. We reply the same working day.
office@northdan.com · +40 750 252 851