New

FlowConsent, our own cookie banner, is live.

Load balancing: plainly explained.

Load balancing spreads traffic across servers so none is overwhelmed. Definition, how it works, algorithms, types, best practices.

Website · Updated Nov 7, 2026

DEFINITION

Load balancing distributes incoming traffic across multiple servers so no single one is overwhelmed, enabling horizontal scaling and failover.

CATEGORY

Website

RELATED

Web hosting, CDN

Summarize this page with AI

01

What is load balancing?

Load balancing is the practice of distributing incoming network traffic across multiple servers, so that no single server gets overwhelmed while others sit idle. A load balancer sits in front of a pool of servers and decides, for each incoming request, which server should handle it, based on an algorithm such as round robin or least connections. This is what lets a website or an API keep serving traffic reliably as usage grows, and keep working even if one server in the pool fails.

Without load balancing, scaling a service means making one server bigger (vertical scaling), which has hard physical limits; with load balancing, a team can add more servers instead (horizontal scaling) and let the load balancer spread traffic between them.

02

How a load balancer works

A load balancer typically also runs health checks against each server in the pool, and stops routing traffic to any server that fails to respond, so users never hit a dead instance. A minimal health check configuration for a load balancer might look like this:

upstream backend {
server 10.0.0.1:8080 max_fails=3 fail_timeout=30s;
server 10.0.0.2:8080 max_fails=3 fail_timeout=30s;
server 10.0.0.3:8080 max_fails=3 fail_timeout=30s;
}

Load balancers operate at different layers of the network: a Layer 4 load balancer routes traffic based on IP address and port, while a Layer 7 load balancer can inspect the actual HTTP request (URL path, headers, cookies) and route more intelligently, for example sending all API traffic to one pool of servers and all static asset requests to another.

03

Common load balancing algorithms

AlgorithmHow it distributes traffic
Round robinSends each new request to the next server in sequenceBest suited forServers with similar capacity
Least connectionsSends requests to the server with the fewest active connectionsBest suited forLong-lived or uneven-duration connections
IP hashRoutes a given client IP to the same server consistentlyBest suited forSession data stored locally on a server
Weighted round robinDistributes traffic proportionally to server capacityBest suited forServers with different hardware specs
04

Types of load balancers

  • Hardware load balancer: a dedicated physical appliance, common in large on-premise data centers.
  • Software load balancer: a program such as Nginx or HAProxy running on a standard server or virtual machine.
  • Cloud load balancer: a managed service offered by a cloud or CDN provider, scaling automatically without infrastructure to maintain.
  • DNS load balancing: distributes traffic by returning different server IPs to different clients at the DNS level, a coarser but simple method.
05

Best practices and common pitfalls

  • Always pair load balancing with health checks, so traffic automatically stops going to a failed or slow server instead of degrading the experience for real users.
  • Choose sticky sessions (routing a user consistently to the same server) only when necessary, since they reduce the flexibility of the load balancer and can create hot spots.
  • Monitor per-server response times and error rates, not just overall traffic, to catch one underperforming server before it drags down the whole pool.
  • Plan for the load balancer itself to be redundant; a single load balancer with no failover becomes a new single point of failure.
06

Why load balancing matters for reliability

Load balancing is what makes horizontal scaling possible, letting infrastructure grow by adding servers rather than upgrading one machine indefinitely, and it is a core building block of high-availability architecture: if one server crashes or needs maintenance, the load balancer simply routes around it, and users notice nothing. For any product expecting real growth in traffic, load balancing is one of the first pieces of infrastructure to get right, well before it becomes a bottleneck.

07

Load balancing at BeBranded

When we architect hosting and infrastructure for clients, we put load balancing in place as soon as reliability or expected traffic justifies more than a single server, whether through a cloud provider's managed load balancer or a CDN edge network. This keeps a site or an app responsive during traffic spikes and resilient to a single server going down. See our website service for how we set up hosting and infrastructure.

FAQ

Questions about Load balancing.

Another question?

Write to us
What is load balancing?
Load balancing is the practice of distributing incoming network traffic across multiple servers so that no single server gets overwhelmed while others sit idle.
What is the difference between load balancing and horizontal scaling?
Horizontal scaling means adding more servers to a pool, while load balancing is the mechanism that actually spreads traffic across that pool of servers.
What load balancing algorithm should I use?
Round robin suits servers with similar capacity, least connections suits long-lived connections, and weighted round robin suits servers with different hardware specs.
What is the difference between Layer 4 and Layer 7 load balancing?
Layer 4 routes traffic based on IP address and port, while Layer 7 inspects the actual HTTP request to route more intelligently, for example by URL path.
Why do load balancers need health checks?
Health checks let a load balancer detect a failed or slow server and stop routing traffic to it automatically, so users never hit a dead instance.
Can a load balancer become a single point of failure?
Yes, if only one load balancer exists with no failover; production setups typically run redundant load balancers to avoid this risk.

Related

Related terms, and where to go next.

BeBranded
Webflow

Webflow developer: role, skills and pricing

Webflow developer: what they do, key skills, pricing by profile, freelance vs agency, and how to choose the right partner for your project.ARTICLE

Read the article
BeBranded
Webflow

Landing page Webflow: complete method to convert

Landing page Webflow: strategy, structure, copywriting, forms, tracking, and optimization. Complete guide to creating pages that convert.

Read the article
BeBranded
Development

Figma to Webflow: the complete workflow in 2026

Figma to Webflow: prepare your mockup, use the plugin, Client-First rebuild, best practices and mistakes to avoid. Step-by-step guide.

Read the article

Let’s talk

Tell us what you want to build.

Thirty minutes with the people who will work on your project. You leave with a clear view of the scope, the timeline and the next steps.

What happens next

  1. 1A 30-minute callWe listen to your goals, your constraints and your context.
  2. 2A clear scopeWe map what is worth doing first, and what it takes.
  3. 3A costed proposalYou decide, with no commitment and no sales pitch.