0

Httpd Load Balancing Theoretics

There are many good ways to craft a “Httpd Load Balancing” system. One of the most common is by using some sort of proxying service and a monitor in between which sends out pings (or so-called “heartbeats”) to a node of servers. To my knowledge that really is the most common one, even by “industry standards”. I am currently experimenting with this for a client so I am testing it on my blog.

I got it working really nice so far. I don’t wish to reveal the entire set up right now because I am somewhat tired, but it’s basically as I said in the first paragraph: a proxy service, monitor and the node. So simple, yet so useful.

If you’re new to load balancing then it takes a bit of reading to get a general understanding. Google is your friend for this kind of stuff.

My balancer switches between either my main / base set up, which is k0nsl-nginx+Apache2 or a Hiawatha webserver configuration that has some minor tweaks so far.

You can do some interesting stuff using PHP too if you don’t want to set up a load balancing between nodes. For example, write code using PHP (or whatever is your preference) that either switches between one webserver or another based on whatever input you chose or desire for a particular application.

One easy example is to switch between webservers based on URL/DOMAIN parameters, such as this very simple example:

Now granted, I have not tried the above code nor do I know if that implementation would be wise. Probably not. You’d need to code an entire skeleton for something like this to work optimally, I believe. However, the idea is albeit valid and load balancing between different servers or even different daemons for WordPress specifically in the simple example above is entirely possible. If somebody has a better idea than the example given in the screenshot above, give me a comment on it.

That’s it.

k0nsl

k0nsl

k0nsl is a programmer, server administrator, designer, moderator, spokesman and factotum of a wide-variety of web pages. You can reach k0nsl via e-mail — i.am@k0nsl.org.

Leave a Reply

Your email address will not be published. Required fields are marked *