Tuesday, October 02, 2007

Client driven load balancing

Recently, I was discussing with one of friend about load balancing.
My friend: How do you do load balancing?
Me: Either you can do at the hardware level or configure and setup the clusters in the application servers?
My friend: If you do at the hardware level, how do you do it?
Me: 1) A separate Load balancer hardware will take all the requests and direct the requests to one of the servers in the list.
2) Have multiple entries in the DNS server with different IP addresses for the same domain name
My friend: In the second option, what is the dis-advantage?
Me: DNS will not check whether the server is in a responding condition or not, it just picks up the entry in round robin fashion and returns it.
My friend: In the first option, what is the dis-advantage?
Me: Single point of failure at the load balancer unit. But we can have the High Availability by having the primary and secondary pair for the load balancer.
My friend: is their any other way to handle this?
Me: there are services like Naming and registry services. But again we need to handle the fail-over for that point.
My friend: Do you think of any other options?
Me: We can move the load balancing to the client side.
My friend: So, do you want to move that load balancing layer to all the layer till the client side?
Me: With the client side load balancing option, their won't be any single point of failure and we can avoid the secondary server that does nothing other than waiting for the failure of the primary server. So, with this option, we can have load balancing with high availability and low cost. And the high availability is always in nines (99.99...). It is all depends on how many nines do you want after "99."

Some days later, when I was searching something on the web2.0 stuff, I found an interesting article related to my point (moving the load balancing to the client side). People are using this technique already.

You can read that article at digital web magazine.

No comments: