Improve website up-time with custom Load Balancing

No matter how many resources (RAM or CPU) you throw at a server your website is susceptible to going offline if anything happens to that one single server.

For this purpose, we highly recommended adding a custom load balanced solution to your websites.

By using a Load Balancer, you can intelligently spread the load amongst two or more servers to keep your site or application performance at its peak. If one of the servers in rotation fails a health check, that server is taken out of the request rotation until it passes several successful health checks in a row.

There are many reasons your single web server could become unavailable:

  • Server is rebooted (Windows Updates, User Request, OS Kernel errors).
  • Application (ColdFusion, IIS, Apache, LiteSpeed, etc.) becomes unavailable.
  • The server is unable to keep up with the load request.
  • There are many more potential scenarios. These are just the top few.

How does a Load Balancer help your website?

In the section above, we explained a couple of common reasons a website might become unavailable. So we’ll use these same pain points to explain the benefits of a custom load balancer solution.

load_balanced

A Load Balancer acts similar to that of a traffic cop you would find on the streets. The purpose of a traffic cop is to use a set of rules to direct traffic in the best way possible that leads to traffic making it to their destination much quicker.

Much like a traffic cop, a load balancer sits in front of the web traffic for your website(s) and follows a preconfigured set of rules that help spread the load between two or more web servers.

Heavy traffic sites are perfect candidates for Load Balancing. Regardless of how much RAM or CPU you throw at a server, there are limitations to how many requests a single server can handle. A load balancer would reduce the load of any single web server and keep your website available even if one of the servers in rotation goes down.

What are health checks? What kind of health checks are available?

A health check in a load balancers configuration is a test of sorts that checks one or more functions of a server to see if it’s capable of handling requests. There are a large number of health checks available:

  • Perform HTTP/HTTPS check - Ensure ‘200’ response or keyword on page matched.
  • Check if SSL comes back verified.
  • Check if the port is accepting connections.
  • Check if database request succeeds.
  • etc…

While there is a great number of preconfigured health check options available, we really can configure any custom health checks that are desired for the setup.

If any of the given health checks fail, then the server that the health checks failed on will be taken out of the load balancer rotation. The server will not be in a rotation to accept any new request until it passes several successful health checks. The number of health checks the server must pass before making it back into the rotation is customizable, as well.

What happens when all servers pass health checks?

It is important to note that while health checks are designed to prevent traffic from going to an unavailable server, it is not the only factor that determines which server the traffic will be sent to. If two or more servers are available in the load balancer rotation (passing all health checks), then we can set a default load spread between all the available servers.

For example, if there are two servers in rotation and we want to spread the load between both evenly we could set each server to 50%. This would allow both servers to split the traffic 50/50 so that a single server is not being overloaded with requests.

We can adjust this to any value desired, such as 80/20 or even 100/0 if that is what is really wanted. While there is a default load spread value set between all servers in rotation the health checks are still respected, so again if a server fails any health checks the load spread could (temporarily) change from 50/50 to 100/0 until the server that is failing health checks comes back up and passes several health checks in a row.

Interested in a custom load balancing setup?

If you are interested in a custom load balancer setup, then please schedule a consultation with our server experts and we’d be happy to discuss your own custom solution and get this configured to your specific needs.

1 Like