Start Clustering!

Even small organizations can benefit from high-availability clusters

14 Min Read
ITPro Today logo in a gray background | ITPro Today

The ability to cluster Windows servers has been available from Microsoft or third-party vendors since Windows NT Server 3.51. Clustering has always sounded like a great idea to server administrators, but in the past, only a few could justify the expense. But price drops and changes in technology have made clustering much more affordable today. I encourage you to consider clustering, even if your organization is small.

If you think that a cluster is a group of servers in which, if one server has a problem, one of the other servers takes over and performs the same task without interruption, you're only partially correct. This definition more accurately describes one form of clustering, called high availability clustering. Another form of clustering—load balancing, or Network Load Balancing (NLB), as Microsoft calls it—is more broadly defined as multiple computers functioning together as one to provide a common set of applications or a service.

Microsoft offers high-availability clustering in Windows Server 2003 Datacenter Edition, Windows Server 2003 Enterprise Edition, Windows 2000 Advanced Server, and Windows 2000 Datacenter Server. In this article, I focus on the features and functionality in Windows 2003. Windows 2003's high-availability clustering supports eight nodes per cluster. NLB clustering, which is available in all versions of Windows 2003, supports up to 32 nodes per cluster.

You can't use Microsoft's high-availability and NLB clustering technologies together to create a nonstop, load-balanced computing environment for your organization. Microsoft supports the use of only one of its clustering technologies at a time. If you need a highly available load-balanced environment, you'll need to investigate solutions from third-party vendors.

High-traffic environments and large organizations use NLB to create Web server farms and terminal services Web farms. But many types of businesses can afford and benefit from high-availability clustering—for example, stock exchanges, airline reservation systems, hospitals, banks, and casinos. Imagine asking a casino manager to stop gambling operations for a few minutes while you apply a service patch and reboot the server. Your environment might not be as extreme, but you should consider using high-availability clustering for your file and print servers, Microsoft Exchange Server and Microsoft SQL Server systems, and specialty application servers. You can easily set up a test environment and follow the steps I lay out to create a cluster.

How Microsoft Cluster Service Works
Clustering sounds like a simple proposition: Attach several computers to a common network and a common hard disk. However, a cluster needs one unique IP address, and you can't just give multiple machines the same IP address. In addition, Windows caches disk information, including file contents, in RAM to improve disk performance. Windows can't "see" another computer's RAM, so having more than one computer writing information to a disk results in a corrupted disk and lost data. Microsoft designed Microsoft Cluster service to address this problem and others.

Microsoft Cluster service creates a phantom IP address that represents the cluster and that can be assigned to any of the cluster nodes. (Each computer in the cluster still has a unique IP address.) Microsoft Cluster service provides a private disk area (aka a quorum disk) that lets the nodes exchange registry settings and cluster status information. Microsoft Cluster service also uses the network to communicate node status among servers in the group.

Microsoft Cluster service is a high-availability clustering solution rather than a fault-tolerant clustering solution. The difference is that users in high-availability environments experience "a momentary pause" (Microsoft's words) during a failover. Fault-tolerant environments don't have any pauses during failovers. In a typical business application, momentary pauses shouldn't pose a problem, but you'll be able to see for yourself how long a momentary pause is in your test cluster.

Creating a Test Environment
If you're a typical server administrator, you probably like to toss the manual aside and begin playing. I provide the information you need to create your own test cluster, along with some tips and pointers that aren't well documented. Remember that these instructions are for you to try on a home or test network. Don't try them on your production Exchange or SQL Server systems.

You'll need at least four computers; three running Windows 2003 Enterprise Edition and the fourth running Windows XP or another client OS. You could use VMware, but you just can't do some things with virtual machines (VMs). My advice is to get a few friends together over a weekend and have a clustering party. This approach will help with the hardware requirements, and you'll learn by interacting with each other.

In addition to the four computers (each with a NIC), you need two additional NICs, two SCSI cards (I used Adaptec AHA-2940s), any size external SCSI disk, a SCSI Y cable, and two 10Mbps or 100Mbps hubs. You also need some Ethernet cables and an MP3 file. If you're missing some of the hardware, visit your favorite online auction. You should be able to purchase the SCSI disk, SCSI cards, and SCSI cable all for less than $100.

The diagram in Figure 1 shows what you're building: a domain controller (DC), two high-availability servers, and a workstation all connected to a network called Public. The two high-availability servers will each have a second NIC and will be connected to a second network called Private. I'll leave it to you to install all the server software, patches, and drivers. A default installation of Windows 2003 Enterprise Edition installs Microsoft Cluster service. On the two high-availability servers, install the second NIC and a SCSI card before installing the server software. Confirm in Device Manager that the SCSI cards and second NICs are functioning properly. Leave the SCSI disk disconnected for now.

Assign all the NICs static IP addresses—you aren't using a DHCP server, and hard-coding server IP addresses is a good practice. Right-click My Network Places, select Properties, then label the NICs in the high-availability servers as Public and Private for easy identification in the future. You don't need a default gateway for the Private address because traffic will never be routed. Enter the DC's IP address as the preferred DNS server in the high-availability servers and workstation. If your high-availability servers have FireWire (IEEE 1394) ports, disable them now or you'll receive an alert when you create your cluster.

You'll use the workstation to view and create text files and play the MP3 file from the server. You can run the Dcpromo utility on the DC system to promote it to a DC and to create the forest and domain. You can add the workstation to the domain, but don't add the two high-availability servers yet.

Now use the SCSI Y cable to attach the SCSI disk to the SCSI cards in the high-availability computers. Make sure your SCSI disk isn't receiving power from either of the high-availability computers.(One of the tests you'll perform later is to pull the power plugs on the high-availability boxes.) Remove the SCSI disk's terminator, and make sure the SCSI cards have termination enabled. Most SCSI disks have the ID set to 0, which is fine. However, you'll probably need to change the ID of one of the SCSI cards. By default, SCSI card IDs are set to 7. Change one to 6 and leave the other at 7, or both cards will be on the same SCSI bus and you'll have a conflict. Power on the high-availability computers one at a time to verify that each one can "see" the attached SCSI disk.

Add both high-availability servers to the domain and give them names that are meaningful to you. I named my two servers d34 and d35 and my domain dog.attbi.com. Finally, create a user account for the cluster. I called my account CSerAct-1 (which is a shortened version of Cluster Services Account-1) and gave it local administrator privileges. On the user account, make sure that the User must change password at next logon option is cleared and select the Password never expires option.

Creating a Cluster and Adding Nodes
To create a high-availability cluster, you first create, or name, the cluster. Next, you add servers, or nodes, to the new cluster. Third, you associate a resource, such as an application or service, with the cluster. The entire process should take about an hour to complete.

We've now created a one-node cluster. To add the second node, select Add nodes to cluster from the Open Connection to Cluster drop-down box to start the Add Nodes Wizard. This wizard takes you through the same steps as the New Server Cluster Wizard. When asked for the computer name and IP address, supply the name and address for the second high-availability server. (Alternatively, you can select New, Node from Cluster Administrator's File menu to add the second node.) Figure 3 shows a two-node cluster in Cluster Administrator.

Creating a Cluster Resource
Now that we've created a cluster, the next task we need to perform is to associate a resource with the cluster. A resource can be a file share, a print spooler, DHCP, WINS, or an application such as Exchange or SQL Server. To create a high-availability file share resource on the SCSI disk, we must create a group, a physical disk resource, an IP address resource, a network name resource, and a file share resource, then bring the file share resource online

To create a group, complete the following steps:

To create a physical disk resource, complete the following steps:

Next, you need to create an IP address resource. This IP address is a virtual IP address for the SCSI disk drive; Microsoft Cluster services will use it to locate the SCSI disk being serviced by one of the high-availability servers. The virtual IP address lets either of the high-availability nodes make disk requests.

To create a network name resource, complete the following steps:

You're now ready to create the file share resource.

The last step is to make the file share available.

The share is now ready to use.

Testing
Now, it's time for you to have some fun. From the workstation, log on to the domain and copy your MP3 file to the SCSI drive attached to the high-availability servers. Begin playing the file and pull the network cable from one of the nodes. Was there a momentary pause, or did the song play without missing a beat? Plug the cable back in and see whether anything happens. Then, pull the network cable from the other server. Did you notice any difference between what happened when you unplugged one server and what happened when you unplugged the other server? Do more experiments (pull more cables, pull the power plug)—have fun on your way to becoming an expert. To keep track of which node is active and which one is passive during your tests, you can use Cluster Administrator or cluster.exe in a command window.

After you conduct your first set of tests, run Microsoft's NetMon to analyze the traffic on both the private segment and public segment when you perform subsequent experiments. See whether you can identify the heartbeat packets sent from the active high-availability server and the fail-over packet. You could also run System Monitor (formerly known as Performance Monitor) on both high-availability nodes for a side-by-side comparison of performance.

If you really like to experiment, try adding a third and even a fourth node to your cluster. The SCSI cable is the tricky thing here, and Microsoft officially supports only the nodes running the OS, not the SCSI cable or drive, so you're on your own. (If you try adding more nodes, I'd like to hear about your results.) The easiest way to add more nodes is to use Internet SCSI (iSCSI). I've created an 8-node cluster by using iSCSI, and I've had more than 60 servers attached to one iSCSI target over a 100Mbps Ethernet network. I encourage you to take some time to become familiar with iSCSI. For starters, see the sidebar "iSCSI Essentials."

We've covered a lot. I wish I could send you to a resource that has more detailed information, but I haven't found one. Books about Windows 2003 by the well-known authors are about Windows Server 2003 Standard Edition—the only clustering they talk about is disk clusters. Your other resource is forums and mailing lists on the Web and on Google in particular. See what other people have done.

Gamers have gaming parties, and system administrators can have clustering parties to learn and pool their knowledge about clustering. As you learn more about clustering, think about how you can use it where you work to make your job less stressful and easier.

Resources

ARTICLES IN WINDOWS & .NET MAGAZINE AND RELATED PUBLICATIONShttp://www.winnetmag.com; search for ClusteringISCSI INITIATORhttp://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=enMICROSOFT CLUSTERING SERVICEShttp://www.microsoft.com/windowsserver2003/technologies/clustering/default.mspx



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like