000webhost

Web hosting

Sunday, August 7, 2011

Server and Link Load Balancers

Once upon a time I worked in a company that had multiple terminal servers. It soon became apparent that they weren't balanced in terms of work load. Due to financial constraints I ended up writing a fairly simple load balancer which is being augmented over time as tme permits (the basic structure of the original script will be posted to my GitHub and/or website eventually). The way it works is fairly simple. A fixed number of servers which is listed in a hash/dictionary data structure is iterated over. If the socket connections can be made to all servers than a naive algorithm which is composed of a random number which is 'mod' by the total number of servers is used in order to decide which server to connect to. However, obviously if a server/servers are down then these are removed from the data structure. Subsequent revisions have involved automatically mapping the network using NMAP, gaining server status information using WMI/SNMP,and storing/updating this data using SQLite to achieve a drop-in software based load balancer (the original script/program was written using a combination of Python and Perl but I may assimilate and/or port it to another language if and when appropiate).

If you do have the resources it may be worthwhile exploring some of the commercially available systems. Many of these options and other mature software based load balancing options are listed in, "Building a Cloud Computing Service", http://dtbnguyen.blogspot.com
The interesting thing though is how there is an increasing trend towards multi-level load balancing and redundancy. For example, application servers are often able to maintain state so that users do not have to re-login during server capitulation and obviously there many layer 3/4 load balancers available as well. In fact, even consumer networking companies are creating their own products nowadays.

If Only Hiring Were So Simple, Random Stuff, and More

- you read some of the articles out there about recruitment practices and things sound so simple... I've watched the recruitment proces...