How Do Network Load Balancers Work?
The traditional model of network communication is called "client-server." A client is a regular computer and a server is usually a much larger computer that holds resources that other computers (clients) want. The client requests the resource from the server and the server delivers it in a response. Where the demand on a server is too great for one computer, that one server is replaced by a group of servers, which is called a cluster. The load balancer accepts all requests from clients and distributes them to the servers in the cluster.
-
Address Consolidation
-
The load balancer presents a single address on behalf of a group of computers. Every computer connected to the Internet has to have a unique IP address. The IP address is defined in the Internet Protocol. Businesses need the public to know the address of the service and return there regularly. The Web address is an easy to remember front for the numeric IP address. Once publicity, links and search engine visibility is in place, the company has to stick with that one IP address and can't institute a system that requires visitors to reapply to a different server's IP address if the first one is busy. The load balancer maintains one access point for several servers. Each server can be accessed directly via its own IP address or through the load balancer through the group IP address.
Default Server
-
The load balancer requires that each server is given a ranking. Each server is given a priority. These are usually a series of numbers starting with 1. The server with the lowest priority number (1) is the default server. The load balancer will allocate work to the default server first, then switch to the server with the next lowest priority number (2) when the default server is busy. This means that one of the servers may be kept constantly busy while the others are idle.
-
Load Percentage
-
The load balancer can be configured to reduce the likelihood of the default host being used all the time and the others only operating as a back up by the introduction of a load percentage. This factor makes the load balancer move on to the next server once the the first server has received the given share of the load. The load percentage is a percentage of all incoming requests, not a percentage of the server's capacity.
Dedicated Servers
-
Some servers in the cluster might be used to specialized in one application, like a database. The load balancer can be configured to split out incoming requests according to application and divert them to the appropriate server. Several servers might serve one application, creating a sub cluster.
Port Rules
-
Each server connects to the load balancer by one socket, called a port. The administrator can select one, or a range of ports and apply rules to them. These are called Port Rules and they implement the load balancer's strategy. The configuration of the load balancer varies slightly from manufacturer to manufacturer, but all require port rules which are made up from a combination of host priority, load percentages and application filtering.
-
References
- Photo Credit Thinkstock Images/Comstock/Getty Images