load balancing
/ˈləʊd ˌbæl.ən.sɪŋ/noun
Load balancing distributes network traffic or other tasks across multiple servers so one server does not have to handle all the work.
The online shop uses load balancing to distribute requests across several servers.
When several servers provide the same application, each request needs to reach a suitable server. A load balancer sits between users and those servers. It receives traffic and forwards each request. Users continue to access the application at the same address.
How does a load balancer choose a server?
A simple method gives each available server a request in turn. Other methods consider active connections, measured response times or each server's capacity. A more powerful server can receive more requests than a less powerful one.
A load balancer often checks whether servers are still responding properly. A server that fails or undergoes maintenance can be temporarily removed from the pool. New requests go to the remaining servers. Once the check passes again, the server can resume receiving traffic.
Load balancing and scalability
Adding servers to the pool allows an application to handle more traffic. This helps with Glossary · In briefpeak loadPeak load is the temporarily high demand on a system when many users, requests or tasks need capacity at the same time.Read more, but load balancing does not start that extra capacity itself. A separate scaling rule or manual action is needed.
The application must also support handling requests on different servers. Session data or files stored on only one server can cause problems when the next request goes elsewhere. Teams therefore often store that data centrally or consistently route a user's requests to the same server.
Load balancing can also support Glossary · In brieffailoverFailover is the switch from a primary system to a backup system when the primary system fails or stops working correctly.Read more, provided healthy servers remain available. The load balancer itself also needs redundancy to avoid becoming a single point of failure.