Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One site multiple servers 1

Status
Not open for further replies.

galli

IS-IT--Management
Apr 16, 2004
21
NZ
Hi

I run an intranet website, at the moment it runs on 1 server. I have 3 IIS servers locally running IIS 5.0/win2k, I would like to put the site on all 3 servers and have the link (on a server on another site) that points the clients to the site to load balance between them. Does anyone have any experience with this, if possible please can you give me a heads up.

Cheers

Ben
 
At different points, I or someone I worked with have used several methods.

1. Javascript to pick a random link from a list.
2. Round-Robin DNS
3. Linux Virtual Server
4. F5 BigIP

I have not used Windows Load Balancing and don't know if it works at all with more than 2 servers.
 
Great, thanks for the quick response lgarner.

Could anyone expand on the first two as they seem to be the ones with the most cost efficient way of acheiving this.
 
I didn't actually write the script for #1, but here's a quick PHP version (which you could use also, if your home page supports PHP). It should be enough for the idea:

<?php
$sites= array("site1","site2","site3","site4");

$idx = rand(0,count($sites)-1);
echo "Redirecting to <a href=\"[$idx]."\">".$sites[$idx]."</a>";
?>


#2 simply requires creating a DNS record for each host IP with the same name:

IN A 1.2.3.4
IN A 1.2.3.5
IN A 1.2.3.6
 
I meant to mention, neither of the first 2 options actually "load-balance" your connections. They just distribute them in a pretty dumb fashion. Also, when one server is down, clients will be denied access if they happen to hit that server.

Option 4 is good, and expensive, and suitable for commercial use. It's what I use now and it's great.

Option 3 is pretty easy and virtually no-cost. You just need a spare computer or two and you can have real load-balancing based on any of several factors like connection count, server response, or just round-robin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top