In case you're not familiar with the concept of a load balancer, the purpose of having one is to spread requests across multiple, identical servers associated with it so as to give the requester the best possible experience. As an added bonus, you can take a box out of load, patch/fix/update it, and throw it back into the fray as the other servers, if you're doing things correctly, can temporarily handle the additional load.

Bottom line - load balancers are cool ...but it can be complicated and/or expensive to implement what is often a hardware based solution. So what can you do? Well, for starters, you could code your own.

Consider the following JavaScript that Dani M. found while trying to download Super from http://www.erightsoft.com/Superdc.html. You can see what I consider a rather unique approach to balancing web requests across multiple servers.


   var Digital=new Date();
   var sec=Digital.getSeconds();
   var rslt1= (sec);
    

   if (rslt1== 0)   {domain1 = 'http://www.erightsoft.info';}    else
   if (rslt1== 1)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1== 2)   {domain1 = 'http://www.erightsoft.org';}   else

   if (rslt1== 3)   {domain1 = 'http://erightsoft.podzone.net';}    else
   if (rslt1== 4)   {domain1 = 'http://www.erightsoft.info';}    else
   if (rslt1== 5)   {domain1 = 'http://www.erightsoft.biz';}    else

   if (rslt1== 6)   {domain1 = 'http://www.erightsoft.org';}   else
   if (rslt1== 7)   {domain1 = 'http://erightsoft.podzone.net';}    else
   if (rslt1== 8)   {domain1 = 'http://www.erightsoft.info';}    else

   if (rslt1== 9)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==10)   {domain1 = 'http://www.erightsoft.org';}   else
   if (rslt1==11)   {domain1 = 'http://erightsoft.podzone.net';}   else

   if (rslt1==12)   {domain1 = 'http://www.erightsoft.info';}    else
   if (rslt1==13)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==14)   {domain1 = 'http://www.erightsoft.org';}   else

   if (rslt1==15)   {domain1 = 'http://erightsoft.podzone.net';}    else
   if (rslt1==16)   {domain1 = 'http://www.erightsoft.info';}    else
   if (rslt1==17)   {domain1 = 'http://www.erightsoft.biz';}    else

   if (rslt1==18)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==19)   {domain1 = 'http://erightsoft.podzone.net';}   else
   if (rslt1==20)   {domain1 = 'http://www.erightsoft.info';}   else

   if (rslt1==21)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==22)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==23)   {domain1 = 'http://erightsoft.podzone.net';}    else

   if (rslt1==24)   {domain1 = 'http://www.erightsoft.info';}   else
   if (rslt1==25)   {domain1 = 'http://www.erightsoft.biz';}   else
   if (rslt1==26)   {domain1 = 'http://www.erightsoft.org';}    else

   if (rslt1==27)   {domain1 = 'http://erightsoft.podzone.net';}    else
   if (rslt1==28)   {domain1 = 'http://www.erightsoft.info';}   else
   if (rslt1==29)   {domain1 = 'http://www.erightsoft.biz';}    else

   if (rslt1==30)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==31)   {domain1 = 'http://erightsoft.podzone.net';}    else
   if (rslt1==32)   {domain1 = 'http://www.erightsoft.info';}   else

   if (rslt1==33)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==34)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==35)   {domain1 = 'http://erightsoft.podzone.net';}    else

   if (rslt1==36)   {domain1 = 'http://www.erightsoft.info';}   else
   if (rslt1==37)   {domain1 = 'http://www.erightsoft.biz';}   else
   if (rslt1==38)   {domain1 = 'http://www.erightsoft.org';}    else

   if (rslt1==39)   {domain1 = 'http://erightsoft.podzone.net';}    else
   if (rslt1==40)   {domain1 = 'http://www.erightsoft.info';}    else
   if (rslt1==41)   {domain1 = 'http://www.erightsoft.biz';}    else

   if (rslt1==42)   {domain1 = 'http://www.erightsoft.org';}   else
   if (rslt1==43)   {domain1 = 'http://erightsoft.podzone.net';}   else
   if (rslt1==44)   {domain1 = 'http://www.erightsoft.info';}    else

   if (rslt1==45)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==46)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==47)   {domain1 = 'http://erightsoft.podzone.net';}   else

   if (rslt1==48)   {domain1 = 'http://www.erightsoft.info';}    else
   if (rslt1==49)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==50)   {domain1 = 'http://www.erightsoft.org';}    else

   if (rslt1==51)   {domain1 = 'http://erightsoft.podzone.net';}   else
   if (rslt1==52)   {domain1 = 'http://www.erightsoft.info';}   else
   if (rslt1==53)   {domain1 = 'http://www.erightsoft.biz';}    else

   if (rslt1==54)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==55)   {domain1 = 'http://erightsoft.podzone.net';}   else
   if (rslt1==56)   {domain1 = 'http://www.erightsoft.info';}   else

   if (rslt1==57)   {domain1 = 'http://www.erightsoft.biz';}    else
   if (rslt1==58)   {domain1 = 'http://www.erightsoft.org';}    else
   if (rslt1==59)   {domain1 = 'http://erightsoft.podzone.net';} 

   document.write("<iframe width='88%' height='400' noresize scrolling='no' frameborder='0' marginheight='0' marginwidth='0' SRC='");  
   document.write(domain1);
   document.write("/S6Kg2.php'> </iframe>"); 

That's right - whatever the second is defines which server you connect to.

Now, to be fair, the submission landed in our Submissions Inbox back in 2011, so the site's code must have been improved since then. Well, after some digging, it was discovered (Here's the file in all its glory: http://www.erightsoft.com/fever03.js.) that the only code difference is that http://erightsoft.podzone.net is now http://www.erightsoft.com. So, if you consider that is an improvement...well, there you go.

On the bright side, three years later, at least there's just as good of a chance that nobody's overwhelming a single server.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!