How to Cluster IIS 6 Web Servers

Tray896Systems Engineer
First of all, clustering IIS is something you should rarely consider doing.

In almost all cases, Microsoft Network Load Balancing (NLB) is a much better solution when you need to provide high availability for your web applications.  There are situations, though, where you have limited hardware or infrastructure that is serving multiple purposes and installing IIS on a cluster is your only option.  

If you do find yourself in this predicament and have to configure IIS on a cluster, the good news is that the process is actually fairly straight-forward.  Since the focus of this article is the setup of IIS on clustered servers, I'm going to leave out all of the Microsoft Cluster Services (MSCS) specifics, assuming you already have the cluster created along with the appropriate disk group and virtual IP resources.  However, if you need help with that part, the following TechNet article "How to Create a Windows Server 2003 Failover Cluster for Cluster Continuous Replication" should help to point you in the right direction.

Here's what you do to configure IIS on an active/passive MSCS cluster:

Install IIS to a local drive on each node of your cluster.
Create a folder on the clustered data drive to hold the website content.
If you are going to create a new site to use other than Default Web, verify that the Default Website is either stopped or bound to a local IP on Node A.  Then create a website on Node A and bind it to All Unassigned.
Point the home directory of your website to the folder you created above.
Create or place a test page in the home directory and verify it comes up.
Fail cluster resources over to Node B and create the website over there, pointing to the same home directory and IP as all unassigned.
Fail back over to Node A.  In Cluster Admin right-click the cluster group name and select New Resource.  
   »» Name it IIS Resource
   »» Select Generic Script for the resource type
   »» Verify both nodes are selected as possible owners
   »» Select the data disk, IP Address, and Name as dependencies
   »» Point to c:\windows\system32\inetsrv\clusweb.vbs for the script parameter
   »» Finish
Right-click IIS Resource and then select Bring Online.
Now right-click IIS Resource and select Initiate Failure 3 times in a row.  Resources should fail over to Node B.
Verify the website comes up on Node B, and then move the resources back to Node A.
Configure DNS for your new website so that it points to the cluster's IP address.

I specifically created this article for IIS 6 (and not 7) for a couple of reasons.  First, that's the only version I've attempted to cluster.  Second, Microsoft's support for clustering on IIS 7 is sketchy at best.  Initially when 2008 Server was released, Microsoft announced that they were completely ditching support for clustering IIS.  This made sense to most of us, until they shipped Clusweb and Clusftp vbs files as part of Windows 2008.  Those are the same script files that were used to cluster IIS 5.0 and 6.0, so including them seemed a little odd since they were no longer part of a supported configuration.  To confuse the issue even further, in just the last few months, Microsoft has backtracked on their earlier statements and they now support clustering IIS 7 - without using the Clusweb or Clusftp files, which apparently were shipped with the OS by mistake.

Bottom line - IIS is a platform, not an application, and therefore is not very well suited for clustering.  NLB or hardware load balancing should be your first choice, but know that it is possible to cluster IIS if you have no other choice.
Tray896Systems Engineer

Comments (2)

Kevin CrossChief Technology Officer
Most Valuable Expert 2011

Agree Tray896, load balancing of web sites is much more common; however, I feel you have captured how to cluster IIS quite nicely.  
As such, I have voted YES above!

Thank you for your efforts.

Unfortunately there is no automated way to sync configuration (metabases) between IIS 6.0 servers.

Using iiscnfg.vbs is probably the easiest way to sync changes between the two servers and is in fact used for the servers.

The alternative is to make all changes made to one IIS server to the other, for instance the provisioning tools that we use create the website on both servers at the same time.

I hope this helps.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.