Search This Blog

Thursday, March 17, 2016

Windows Cluster

The "cluster" word may be seen by many as over kill or too complex specially for small hobby project where a VPS or a dedicated server is enough. However in a professional environment where down times are expensive or dangerous a cluster is the first step to provide an higher availability than a good single server.

What is a cluster exactly? A cluster is a group of machines which for a set of services should react as a single machine on the client side. For example, if I have a clustered web hosting, as customer I can connect via my browser to one of the hosted site without having to know on which node of the cluster this will be handled. There is however some subtleties between clustering and load balancing. Load balancing will split the work between the nodes, while a more traditional cluster will not and may actually load all on a single node. Load balancing doesn't ensure an higher availability but can depending on how the balancer is made.

I will not talk about load balancing but simply about how to setup a simple cluster system with Windows server.

Windows Server standard edition can without troubles create a cluster of two or more nodes. Two being the minimal set to make it work. While you can create a cluster with a so called "share nothing" configuration I will here instead explain how to setup a cluster with shared disks. For that you will need at least 2 servers plus an external storage like a Synology NAS.


The NAS should be configured to server ideally 2 iSCSI disks (one quite small for the quorum and one bigger for the shared data). Once you created your iSCSI disks and configured them allowing multiple concurrent connections, mount them on both machines via the iSCSI Initiator (Control panel => Administrative tools => iSCSI Initiator).

After having on both server the same disks mounted, you can start building the cluster. For that you will need to add the cluster role, and then via the cluster manager panel create a new cluster. To be able to create a cluster windows requires to be part of an active directory domain, if your servers are not yet part of it, it is time to do so. You could run the active directory on the cluster nodes as well, but it would be better to have an external machine handling the domain.

During the creation of the cluster, windows will check what is available and should add the possible shared disks. If not you will need add them yourself afterward.

Use the smaller disk for the quorum while keeping the bigger disk for shared services like SQL Server or simply a clustered file system.

Be warned that by itself IIS is not really part of the cluster, however you can (even if it requires some setup) run a shared IIS configuration and even shared WWW directory on the shared file system. If well configured your IIS will appear as a clustered service as if you stop one node the other will take over the requests, however the cluster manager doesn't check IIS for you automatically, and therefore either you write yourself some scripts or you will need to manually migrate the nodes if one is failing.

What is a cluster good for? For example if you need to apply windows updates with reboots and such, you will have basically no down time as everything will fall on the remaining node. If one of the 2 servers break you will not have to worry either as you will still have one node working. But be prepared to work with a more complex environment than a standalone installation.

No comments:

Post a Comment