Load Balancing

When an organization reaches the breaking point of having too much web traffic for one web server to handle, the solution is to have multiple back end web servers dole out the requests. The problem then becomes how to make these multiple servers look and act like one server to the end user (that would be you). The answer is…wait for it…Load Balancing.

“David, what does a load balancer do?”, you ask. Well, assume you, as the end user, are browsing http://www.williams.edu. You aren’t actually talking directly to the back end web server. You’re talking to the load balancer, which, in turn, talks to the back end web servers.

Here are the gory details on how it works. Topologically speaking, the load balancer sits between the end user (you) and the back end web servers. It performs three main functions:

  1. Monitoring the back end servers.
  2. Accepting website requests from the end user (still you).
  3. Routing the end user traffic (yup, from you) to an available server.

On a periodic basis (usually every ten seconds), the load balancer sends a request to each back end server. If the back end server responds quickly, the load balancer decides it is healthy and can accept traffic. If the back end server doesn’t respond at all (not unlike my two children), the load balancer will not route any end user traffic to it. If the back end server is slow to respond, the load balancer may or may not route end user traffic to it, depending on how it’s set up.

There are many methods that can be used to tell the load balancers how to route traffic to the back end servers. It can send the same number of requests to each healthy server; it can send the request to the server with the least number of open connections; or it can send it to the sever that responds the fastest.

Most of the load balancers in the marketplace now do far more than just load balancing. For instance, they can perform the encryption and decryption required for SSL (Secure Socket Layer) requests, which removes that work from the web servers themselves. Some load balancers can even route requests to different servers based upon what’s being requested.

Dave Parks

Dave Parks doing a load balancer impression.

Comments are closed.