Load Balancing
SyllabusAwareness in IT and computers: AI, data and digital technologies
Load balancing distributes incoming requests or computing tasks across multiple servers so that one server does not carry a disproportionate share of the workload. In cloud infrastructure, a load balancer selects an available backend server for each request or connection according to a distribution policy, improving resource use, responsiveness and service availability.
How requests reach backend servers
Clients access a service through a common endpoint rather than choosing individual servers. The load balancer directs traffic to servers in a configured backend pool.
- A Layer 4 load balancer distributes traffic using transport-level information, such as IP addresses and port numbers.
- A Layer 7 load balancer can inspect application-level information, such as an HTTP request's hostname or URL path, to select an appropriate backend.
- The load balancer uses health checks to identify unhealthy backends and stop selecting them for new traffic until they recover.
How the destination server is selected
The distribution policy determines what counts as a suitable destination. Balanced operation does not necessarily mean sending an equal number of requests to every server.
- Round robin assigns successive requests or connections to servers in rotation.
- Weighted round robin assigns a larger share to servers given higher weights, allowing the distribution to reflect differences in capacity.
- Least connections selects a server with fewer active connections, although connection count is not a complete measure of processing load.
- Hash-based selection uses information such as a client identifier or request key to select a backend consistently.
How it supports cloud scalability
Load balancing and auto-scaling perform complementary functions: auto-scaling changes the available computing capacity, while load balancing distributes work across that capacity.
- When additional server instances are added and registered as healthy backends, the load balancer can begin directing traffic to them.
- Distributing requests across multiple instances supports horizontal scaling, in which capacity increases by adding machines rather than only enlarging one machine.
- Redirecting new traffic away from failed servers improves availability, but does not automatically recover requests already being processed.
Why load balancing alone is insufficient
Load balancing requires supporting design choices to deliver resilience.
- Session affinity can keep a user's requests on the same backend; shared session storage can instead allow different servers to handle those requests.
- The load-balancing service itself needs redundancy so that it does not become a single point of failure.
- Traffic distribution cannot overcome inadequate total capacity or a shared failure affecting all backend servers.
Keep reading
The news behind topics like this, explained every day
Every day Gyaanam reads The Hindu, the Indian Express and PIB and picks what matters for UPSC. Each story is written up against the syllabus line it belongs to. Your first 7 days or 3 articles are free, whichever ends first.