IT Infrastructure & Cloud
What is a Load Balancer?
Also called server load balancer, load balancing.
Short definition
A load balancer is a device or service that distributes user requests across several servers running the same application, so no single server is overwhelmed and the service keeps running if one server goes down.
How it works
Users do not access the application servers directly, but through the load balancer. The load balancer forwards each request to one of the servers behind it, for example in rotation or to the server handling the fewest connections. It also checks server health regularly. If a server stops responding, further requests are no longer sent to it until it recovers.
Example in a company
A customer portal runs on two servers. When the team installs an update, one server is taken out of the load balancer, updated, and put back, then the second server gets the same treatment. Users notice no disruption. During month-end closing, when usage spikes, a third server can be added without changing the application address.
Things to keep in mind
The application needs to be designed to run on multiple servers at once. Login sessions, uploaded files, and cache should be stored in a shared location, not on one server's disk, so users are not suddenly logged out when they are moved to another server. The load balancer itself also needs a backup, because if it goes down, every server behind it becomes unreachable too. Cloud providers generally offer managed load balancers that already account for this.
Related terms
Resources
- Cloudflare Learning: What is load balancing? (cloudflare.com)
- AWS: What is load balancing? (aws.amazon.com)