{"id":1573,"date":"2015-05-12T21:25:51","date_gmt":"2015-05-12T21:25:51","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=1573"},"modified":"2018-09-06T23:15:37","modified_gmt":"2018-09-06T23:15:37","slug":"how-to-set-up-clustered-windows-servers","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=1573","title":{"rendered":"How to set up clustered Windows servers"},"content":{"rendered":"<h3>Setting up clustering on Windows servers is not as difficult as it&#8217;s often made out to be. There are some precise steps to be followed and all becomes clear.<\/h3>\n<p>&nbsp;<\/p>\n<p>I\u2019ve asked a number of people recently whether they\u2019d installed clustering on Windows servers. Turns out that none of them had \u2013 though one had inherited a clustered server pair that he looked after (or which, it turned out, pretty well looked after itself). Turns out that in many cases people think that clustering is either (a) too expensive or (b) too hard to justify the benefits.<\/p>\n<p>It can\u2019t be denied that clustering is expensive when compared to the alternative (ie buying a single server with redundant everything and plenty of RAID). Not only do you have to buy more than one server, but if you\u2019re in a Windows world you need the Enterprise version of Windows server \u2013 which has a hefty price tag compared to the Standard edition. And what about the benefits? Well, in a server with redundant disks, PSUs and fans, and with a decent architecture that can even swap out duff RAM, the main thing you\u2019re gaining is protection against the server motherboard going a bit Pete Tong. Which isn\u2019t all that common.<\/p>\n<p>Something else I discovered is that the difference between clustering and replication is widely misunderstood. Clustering is often taken as synonymous with the act of having two servers with copies of all the programs and data, with replication turned on so that server B keeps a copy of server A\u2019s world (and potentially vice versa) such that one machine can take over in the event of the other failing. This isn\u2019t, in fact, what you do if you\u2019re using Clustering Services under Windows \u2013 it\u2019s just data replication.<\/p>\n<p>In a Windows cluster, you have two or more servers running the programs, with a shared disk (or disks) holding the data. All the servers are able to see the data (which could be on a SAN of some description or could be connected directly to each server via SCSI or Fibre Channel) and the servers decide between themselves which is allowed to use the shared disk(s) at any time. Both servers have copies of the application programs on their own internal disks, and they negotiate between themselves which machine is running each application at any given time. In the event of a problem, each affected application is switched to a different server. Let\u2019s go through how it all hangs together step by step.<\/p>\n<p>1. The shared storage\u00a0The shared storage subsystem is potentially the weak link in the system \u2013 after all, there\u2019s only one of them. It\u2019s essential, therefore, that you\u2019re able to use redundant power supplies and external connection adaptors (Fibre Channel, SCSI, etc) and that you have disks in a sensible RAID configuration (at least mirrored or RAID 5, preferably a higher level in order to allow for multiple drive failures).<\/p>\n<p>Now, there are two approaches you can use in the RAID array. One is to buy an array which has built-in RAID capabilities \u2013 that is, the box itself deals with the RAID task and presents the disk set to external devices as one or more logical volumes. The other is to buy an array which is simply a box of disks, and implement the RAID function on adaptor cards in your servers. The first option is certainly the neatest, since all you have to do is bung a standard (non-RAID) adaptor in each server and the disk array does the RAID. The second option\u2019s supported by a lot of popular kit, though (if you buy something like a pair of PowerEdge servers and a PowerVault 220 from Dell, this is the way you\u2019ll be working), and it\u2019s not rocket science to get working.<\/p>\n<p>If you\u2019re using a pair of servers and a single disk array, SCSI connection\u2019s probably the way you\u2019ll choose to go, with each server connecting to a SCSI card in the disk array (don\u2019t forget to set the card in each server to a different SCSI ID, or you\u2019ll break things). With more servers, or perhaps multiple arrays, you\u2019ll be heading for a SAN of some sort to achieve your many-to-many connections.<\/p>\n<p>2. The servers\u00a0On the face of it, it sounds like you can buy a bunch of cheap servers and cluster them so that they take over from each other in the event of a failure. It\u2019s not quite that simple, though, when you realise that you\u2019re not actually clustering servers, but services.<\/p>\n<p>I\u2019ll explain. The common way to implement clustering is an active\/passive setup \u2013 that is, one entity is the live server dealing with the applications, and the other is watching the live one and can take over if the former goes away. The thing is, though, that you don\u2019t have to run all your live stuff on one server. To contrive a scenario, say you have SQL Server and Exchange and a pair of servers. It seems a shame to have both applications running on one machine, with the second machine sitting idle 99.9% of the time. Why not have server A run the active SQL Server and a passive instance of Exchange, and server B run the active Exchange and the passive SQL Server? That way you get good use of your kit, but if one server dies you retain both services \u2013 albeit with some speed degradation. Incidentally, you can have the same application running actively on multiple servers in some circumstances, but we won\u2019t go there just now \u2013 have a look at http:\/\/technet2.microsoft.com\/WindowsServer\/en\/Library\/8846a72b-0882-4a24-8eee-a768e52925281033.mspx?mfr=true if you\u2019re interested in doing this.<\/p>\n<p>Because you have multiple servers running live instances of applications, then, you\u2019ll want some redundancy. Redundant fans and PSUs are a definite must, and you\u2019ll probably want to have a mirrored pair of disks as the boot volume, just in case.<\/p>\n<p>3. Addressing\u00a0This is where it gets clever. Each server will, of course, have its own IP address. What you do with clustering is to add \u201cvirtual servers\u201d that are understood by the operating system. A virtual server has its own little resource set (basically an IP address and a shared disk volume), and it is this \u201cvirtual\u201d IP address that is used by the cluster to decide who answers what calls from the network. So if your SQL Server service has the address 10.1.1.10, and server A is normally the active server for that service, it will answer requests aimed not only at its own individual IP address but to 10.1.1.10 as well. If server A dies, server B starts answering requests to 10.1.1.10 \u2013 so as soon as clients\u2019 ARP caches get flushed, their requests get magically dealt with by server B.<\/p>\n<p>4. How the servers interconnect\u00a0The sensible way to go for clustering is to have two LAN interfaces in each machine \u2013 not a problem these days, as most servers come with two interfaces anyway. One interface on each machine is used to connect to the active LAN and service requests; the other sits on a private LAN and simply deals with cluster-related communications that the servers throw between them (mainly the frequent \u201cheartbeat\u201d that is sent between machines to check there\u2019s life). You\u2019ll also find that the servers in a cluster use a small (500MB or so) shared disk volume (called the \u201cquorum\u201d in Windows parlance) to store shared data.<\/p>\n<p>5. How you get started\u00a0Starting up clustering is actually dead easy. First, in a Windows world all your servers need to be in an Active Directory (AD) world, and you\u2019ll need to set up a user ID that they can all use. Then you turn on just one server and use the normal OS and vendor tools to configure the RAID arrangement and define\/format the various disks that are to be shared. Next, run up the Cluster Administrator application and walk through the wizard answering some dead simple questions (what user ID to log in as, which volumes to treat as shared, etc). Within five minutes you\u2019ll have a one-node cluster. Then it\u2019s just a case of turning all the other servers on and hitting \u201cAdd node\u201d in the management application).<\/p>\n<p>6. Applications\u00a0In theory, there\u2019s nothing to prevent you from clustering pretty well any application by defining a virtual server by hand, allocating resources, installing the application to the virtual server, and so on. Nine times out of ten, though, clusters are used to run applications that are inherently cluster-aware. This means that if you install, say, SQL Server, the installer will say: \u201cAh, that\u2019s a cluster \u2013 would you like me to create a virtual server for you and install myself on it?\u201d. Not only this, but because you\u2019re installing to a virtual machine, the software gets installed on all servers at once \u2013 that is, you don\u2019t have to walk around every machine with the CD.<\/p>\n<p>7. Dealing with failovers\u00a0In a two-server cluster, it\u2019s pretty obvious how the nodes will behave in the event of a server problem. With more than two nodes, though, you can manually define how each service (virtual server) is to be dealt with in the event of a failover. How complex your approach is is entirely up to you \u2013 with shedloads of servers you can have every machine actively running something, or you can choose to have one or more &#8220;hot spare&#8221; machines that sit idle until something breaks. Oh, and if you want to take a server offline for maintenance, you can manually failover services.<\/p>\n<p>8. Will the user notice?\u00a0In a connectionless application (ie one that doesn\u2019t retain a constant connection to the server, but instead connects as required) there\u2019s every chance the users won\u2019t even notice a failure \u2013 or if they do, it\u2019ll simply be a slight pause while the virtual server addresses get swapped. For connection-oriented applications, though (eg Telnet sessions) the connection will be terminated and the user may get a &#8220;Connection lost&#8221; error message. So long as the application has been written to deal with lost connections (and let\u2019s face it, it\u2019s no different from what would happen if someone kicked a network cable out) it should retry the connection and will reconnect quite happily to the new machine that\u2019s taken on the server\u2019s address.<\/p>\n<p>Summary\u00a0Don\u2019t be scared of clustering. It\u2019s easy to set up, and although you need multiple servers, they don\u2019t have to be massively expensive. It\u2019s not unreasonable to expect to go from a pair of servers still in the cardboard boxes to a basic two-node SQL Server cluster in a day \u2013 and once it\u2019s up and running, the management tools make it easy to monitor machines and add\/change\/remove services as you wish.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting up clustering on Windows servers is not as difficult as it&#8217;s often made out to be. There are some precise steps to be followed and all becomes clear. &nbsp; I\u2019ve asked a number of people recently whether they\u2019d installed clustering on Windows servers. Turns out that none of them had \u2013 though one had [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,6],"tags":[],"class_list":["post-1573","post","type-post","status-publish","format-standard","hentry","category-raid-redundant-array-of-independent-disks","category-general-2008"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1573"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions"}],"predecessor-version":[{"id":1574,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions\/1574"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}