Thursday, November 05, 2009 9:47 AM
First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft 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 straightforward. I’m going to leave out all of the MSCS specifics and just assume that you already have the cluster created along with the disk group and virtual IP resources. If you need help with that part of it, technet should be able to point you in the right direction.
Here’s what you do to configure IIS on an active/passive MSCS cluster:
- Install IIS 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 and Generic Script for the resource type
- Verify both nodes are 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 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.vbs and Clusftp.vbs 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 Clusweb.vbs or Clusftp.vbs – they 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.