Windows 2000 Clustering Technologies: Cluster Service Architecture
The Cluster service is one of two Microsoft Windows Clustering technologies available for the Microsoft Windows 2000 family of server products. Windows 2000-based servers running Cluster service provide failover support for back-end applications and services that require high availability and data integrity. These back-end applications include enterprise applications such as database, file server, enterprise resource planning (ERP), and messaging systems. This white paper focuses on the architecture and features of the Cluster service and describes its terminology, concepts, design goals, key components, and planned future directions.
On This Page
Cluster Service Architecture
Cluster Formation and Operation
For More Information
First designed for the Windows NT Server 4.0 operating system, Cluster service is substantially enhanced in the Windows 2000 Advanced Server and Datacenter Server operating systems. Cluster service enables connecting multiple servers into server clusters that provide high availability and easy manageability of data and programs running within the cluster. Cluster service provides three principal advantages in clustering technology:
Improved availability by enabling services and applications in the server cluster to continue providing service during hardware or software component failure or during planned maintenance.
Increased scalability by supporting servers that can be expanded with the addition of multiple processors (up to a maximum of eight processors in Windows 2000 Advanced Server and 32 processors in Datacenter Server), and additional memory (up to a maximum of 8 gigabytes of random access memory [RAM] in Advanced Server and 64 GB in Datacenter Server).
Improved manageability by enabling administrators to manage devices and resources within the entire cluster as if they were managing a single computer.
Cluster service is one of two complementary Windows clustering technologies provided as extensions to the base Windows 2000 and Windows NT operating systems. The other clustering technology, Network Load Balancing, complements Cluster service by supporting highly available and scalable clusters for front-end applications and services such as Internet or intranet sites, Web-based applications, media streaming, and Microsoft Terminal Services.
This white paper focuses solely on the architecture and features of Cluster service and describes its terminology, concepts, design goals, key components, and planned future directions. At the end of the paper, the section "For More Information" provides a list of references you can use to learn more about Cluster service and the Network Load Balancing technologies.
Computer clusters have been built and used for well over a decade. One of the early architects of clustering technology, G. Pfister, defined a cluster as "a parallel or distributed system that consists of a collection of interconnected whole computers, that is utilized as a single, unified computing resource."
The collection of several server computers into a single unified cluster makes it possible to share a computing load without users or administrators needing to know that more than one server is involved. For example, if any resource in the server cluster fails, the cluster as a whole can continue to offer service to users using a resource on one of the other servers in the cluster, regardless of whether the failed component is a hardware or software resource.
In other words, when a resource fails, users connected to the server cluster may experience temporarily degraded performance, but do not completely lose access to the service. As more processing power is needed, administrators can add new resources in a rolling upgrade process. The cluster as a whole remains online and available to users during the process, while the post-upgrade performance of the cluster improves.
User and business requirements for clustering technology shaped design and development of the Cluster service for the Windows 2000 Advanced Server, Windows 2000 Datacenter Server, and Windows NT Server 4.0 operating systems. The principal design goal was development of an operating system service that addressed the cluster needs of a broad segment of business and organizations, rather than small, specific market segments.
Microsoft marketing studies showed a large and growing demand for high availability systems in small- and medium-sized businesses as databases and electronic mail became essential to their daily operations. Ease of installation and management were identified as key requirements for organizations of this size. At the same time, Microsoft research showed an increasing demand for Windows-based servers in large enterprises with key requirements for high performance and high availability.
The market studies led to development of Cluster service as an integrated extension to the base Windows 2000 and Windows NT operating systems. As designed, Cluster service enables joining multiple server and data storage components into a single, easily managed unit, the server cluster. Server clusters can be used by small and large enterprises to provide highly available and easy-to-manage systems running Windows 2000 and Windows NT-based applications. Cluster service also provides the application interfaces and tools needed to develop new, cluster-aware applications.
Cluster service is the Windows 2000 name for the Microsoft technology first made available as Microsoft Cluster Server (MSCS) in Windows NT Server 4.0, Enterprise Edition. When referring to servers that comprise a cluster, individual computers are referred to as nodes. Cluster service refers to the collection of components on each node that perform cluster-specific activity and resource refers to the hardware and software components within the cluster that are managed by Cluster service. The instrumentation mechanism provided by Cluster service for managing resources is the resource dynamically linked libraries (DLLs). Resource DLLs define resource abstractions, communication interfaces, and management operations.
A resource is online when it is available and providing its service to the cluster. Resources are physical or logical entities that have the following characteristics:
Can be brought online and taken offline.
Can be managed in a server cluster.
Can be owned by only one node at a time.
Cluster resources include physical hardware devices such as disk drives and network cards, and logical items such as Internet Protocol (IP) addresses, applications, and application databases. Each node in the cluster will have its own local resources. However, the cluster also has common resources, such as a common data storage array and private cluster network. These common resources are accessible by each node in the cluster. One special common resource is the quorum resource, a physical disk in the common cluster disk array that plays a critical role in cluster operations. It must be present for node operations—such as forming or joining a cluster—to occur.
A resource group is a collection of resources managed by Cluster service as a single, logical unit. Application resources and cluster entities can be easily managed by grouping logically related resources into a resource group. When a Cluster service operation is performed on a resource group, the operation affects all individual resources contained within the group. Typically, a resource group is created to contain all the elements needed by a specific application server and client for successful use of the application.
Cluster service is based on a shared-nothing model of cluster architecture. This model refers to how servers in a cluster manage and use local and common cluster devices and resources. In the shared-nothing cluster, each server owns and manages its local devices. Devices common to the cluster, such as a common disk array and connection media, are selectively owned and managed by a single server at any given time.
The shared-nothing model makes it easier to manage disk devices and standard applications. This model does not require any special cabling or applications and enables Cluster service to support standard Windows 2000- and Windows NT-based applications and disk resources.
Cluster service uses the standard Windows 2000 and Windows NT Server drivers for local storage devices and media connections. Cluster service supports several connection media for the external common devices that need to be accessible by all servers in the cluster. External storage devices that are common to the cluster require small computer system interface (SCSI) devices and support standard PCI-based SCSI connections as well as SCSI over fiber channel and SCSI bus with multiple initiators. Fiber connections are SCSI devices, simply hosted on a fiber channel bus instead of a SCSI bus. Conceptually, fiber channel technology encapsulates SCSI commands within the fiber channel and makes it possible to use the SCSI commands Cluster service is designed to support. These SCSI commands are Reserve/Release and Bus Reset and will function the same over standard or non-fiber SCSI interconnect media.
The following figure illustrates components of a two-node server cluster that may be composed of servers running either Windows 2000 Advanced Server or Windows NT Server 4.0, Enterprise Edition with shared storage device connections using SCSI or SCSI over Fiber Channel.
Figure 1: Two-node server cluster running Windows 2000 Advanced Server or Windows NT Server 4.0, Enterprise Edition
Windows 2000 Datacenter Server supports four-node clusters and does require device connections using Fibre Channel as shown in the following illustration of the components of a four-node cluster.
Figure 2: Four-node server cluster running Windows 2000 Datacenter Server
One of the benefits of Cluster service is that applications and services running on a server cluster can be exposed to users and workstations as virtual servers. To users and clients, connecting to an application or service running as a clustered virtual server appears to be the same process as connecting to a single, physical server. In fact, the connection to a virtual server can be hosted by any node in the cluster. The user or client application will not know which node is actually hosting the virtual server.
Note: Services or applications that are not accessed by users or client applications can run on a cluster node without being managed as a virtual server.
Multiple virtual servers representing multiple applications can be hosted in a cluster. This is illustrated in figure 2.
Figure 3: Physical view of virtual servers under Cluster service
The figure above illustrates a two-node cluster with four virtual servers; two virtual servers exist on each node. Cluster service manages the virtual server as a resource group, with each virtual server resource group containing two resources: an IP address and a network name that is mapped to the IP address.
Application client connections to a virtual server are made by a client session that knows only the IP address that Cluster service publishes as the address of the virtual server. The client view is simply a view of individual network names and IP addresses. Using the example of a two-node cluster supporting four virtual servers, the client view of the cluster nodes and four virtual servers is illustrated in figure 4.
As shown in figure 4, the client only sees the IP addresses and names and does not need see information about the physical location of any of the virtual servers. This allows Cluster service to provide highly available support for the applications running as virtual servers.
Figure 4: Client view of Cluster service virtual servers
In the event of an application or server failure, Cluster service moves the entire virtual server resource group to another node in the cluster. When such a failure occurs, the client will detect a failure in its session with the application and attempt to reconnect in exactly the same manner as the original connection. It will be able to do this successfully, because Cluster service simply maps the published IP address of the virtual server to a surviving node in the cluster during recovery operations. The client session can reestablish the connection to the application without needing to know that the application is now physically hosted on a different node in the cluster.
Note that while this provides high availability of the application or service, session state information related to the failed client session is lost unless the application is designed or configured to store client session data on disk for retrieval during application recovery. Cluster service enables high availability, but does not provide application fault tolerance, unless the application itself supports fault tolerant transaction behavior. Microsoft DHCP service is a service that provides an example of an application that stores client data and can recover from failed client sessions. DHCP client IP address reservations are saved in the DHCP database. If the DHCP server resource fails, the DHCP database can be moved to an available node in the cluster, and restarted with restored client data from the DHCP database.
Resource groups are logical collections of cluster resources. Typically, a resource group is made up of logically related resources such as applications and their associated peripherals and data. However, resource groups can contain cluster entities that are related only by administrative needs, such as an administrative collection of virtual server names and IP addresses. A resource group can be owned by only one node at a time and individual resources within a group must exist on the node that currently owns the group. At any given instance, different servers in the cluster cannot own different resources in the same resource group.
Each resource group has an associated cluster-wide policy that specifies which server the group prefers to run on, and which server the group should move to in case of a failure. Each group also has a network service name and address to enable network clients to bind to the services provided by the resource group. In the event of a failure, resource groups can be failed over or moved as atomic units from the failed node to another available node in the cluster.
Each resource in a group may depend on other resources in the cluster. Dependencies are relationships between resources that indicate which resources need to be started and available before another resource can be started. For example, a database application may depend on the availability of a disk, IP address, and network name to be able to start and provide services to other applications and clients.
Resource dependencies are identified using Cluster service resource group properties and enable Cluster service to control the order in which resources are brought on and off line. The scope of any identified dependency is limited to resources within the same resource group. Cluster managed dependencies cannot extend beyond the resource group, because resource groups can be brought online and offline and moved independently.
Cluster Service Architecture
Cluster service is designed as a separate, isolated set of components that work together with the operating system. This design avoids introducing complex processing system schedule dependencies between the Cluster service and the operating system. However, some changes in the base operating system are required to enable cluster features. These changes include:
Support for dynamic creation and deletion of network names and addresses.
Modification of the file system to enable closing open files during disk drive dismounts.
Modifying the I/O subsystem to enable sharing disks and volume sets among multiple nodes.
Apart from the above changes and other minor modifications, cluster capabilities are built on top of the existing foundation of the Windows 2000 and Windows NT operating systems.
Cluster Service Components
Cluster service runs on the Windows 2000 or Windows NT 4.0 operating system using network drivers, device drivers, and resource instrumentation processes designed specifically for Cluster service and its component processes. These closely related, cooperating components of Cluster service are:
Checkpoint Manager—saves application registry keys in a cluster directory stored on the quorum resource.
Communications Manager—manages communications between cluster nodes.
**Configuration Database Manager—**maintains cluster configuration information.
Event Processor—receives event messages from cluster resources such as status changes and requests from applications to open, close, and enumerate cluster objects.
Event Log Manager—replicates event log entries from one node to all other nodes in the cluster.
Failover Manager—performs resource management and initiates appropriate actions, such as startup, restart, and failover.
**Global Update Manager—**provides a global update service used by cluster components.
Log Manager—writes changes to recovery logs stored on the quorum resource.
**Membership Manager—**manages cluster membership and monitors the health of other nodes in the cluster.
**Node Manager—**assigns resource group ownership to nodes based on group preference lists and node availability.
**Object Manager—**manages all the cluster service objects.
**Resource Monitors—**monitor the health of each cluster resource using callbacks to resources DLLs. Resource Monitors run in a separate process, and communicate with the Cluster service through remote procedure calls (RPCs) to protect Cluster service from individual failures in cluster resources.
The Node Manager runs on each node and maintains a local list of nodes that belong to the cluster. Periodically, the Node Manager sends messages—called heartbeats—to its counterparts running on other nodes in the cluster to detect node failures. It is essential that all nodes in the cluster always have exactly the same view of cluster membership.
In the event that one node detects a communication failure with another cluster node, it broadcasts a message to the entire cluster causing all members to verify their view of the current cluster membership. This is called a regroup event. The Cluster service prevents write operations to any disk devices common to all nodes in the cluster until the membership has stabilized. If the Node Manager on an individual node does not respond, the node is removed from the cluster and its active resource groups are moved to another active node. To select the node to which a resource group should be moved, Node Manager identifies the node on which a resource group prefers to run and the possible owners (nodes) that may own individual resources. On a two-node cluster, the Node Manager simply moves resource groups from a failed node to the surviving node. On a three- or four- node cluster, Node Manager selectively distributes resource groups amongst the surviving nodes.
Note: In the event that Cluster service and its component processes should fail, resources attached to the node experiencing the failure are stopped under the assumption that they will be restarted on an active node in the cluster.
Configuration Database Manager
The Configuration Database Manager implements the functions needed to maintain the cluster configuration database. The configuration database contains information about all of the physical and logical entities in a cluster. These entities include the cluster itself, cluster node membership, resource groups, resource types, and descriptions of specific resources, such as disks and IP addresses.
Persistent and volatile information stored in the configuration database is used to track the current and desired state of the cluster. Each Configuration Database Manager running on each node in the cluster cooperates to maintain consistent configuration information across the cluster. One-phase commits are used to ensure the consistency of the copies of the configuration database on all nodes. Configuration Database Manager also provides an interface for use by the other Cluster service components. This interface is similar to the registry interface exposed by the Win32 application programming interface (API) set. The key difference is that changes made to cluster entities are recorded by the Configuration Database Manager and then replicated to other nodes by the Global Update Manager.
Note: Application registry key data and changes are recorded by the Checkpoint Manager in quorum log files on the quorum resource.
To ensure that the Cluster service can recover from a resource failure the Checkpoint Manager checks registry keys when a resource is brought online and writes checkpoint data to the quorum resource when the resource goes offline. Cluster-aware applications use the cluster configuration database to store recovery information. Applications that are not cluster-aware store information in the local server registry.
The Log Manager, along with the Checkpoint Manager, ensures that the recovery log on the quorum resource contains the most recent configuration data and change checkpoints.
The Failover Manager is responsible for stopping and starting resources, managing resource dependencies, and for initiating failover of resource groups. To perform these actions, it receives resource and system state information from Resource Monitors and the Node.
The Failover Manager is also responsible for deciding which nodes in the cluster should own which resource group. When resource group arbitration finishes, nodes that own an individual resource group turn control of the resources within the resource group over to Node Manager. When failures of resources within a resource group cannot be handled by the node that owns the group, Failover Managers on each node in the cluster work together to re-arbitrate ownership of the resource group.
If a resource fails, Failover Manager might restart the resource, or take the resource offline along with its dependent resources. If it takes the resource offline, it will indicate that the ownership of the resource should be moved to another node and be restarted under ownership of the new node. This is referred to as failover.
Failover can occur automatically because of an unplanned hardware or application failure, or can be triggered manually by the person who administers the cluster. The algorithm for both situations is identical, except that resources are gracefully shut down for a manually initiated failover, while they are forcefully shut down in the failure case.
When an entire node in the cluster fails, its resource groups are moved to one or more available servers in the cluster. Automatic failover is similar to planned administrative reassignment of resource ownership. It is, however, more complicated, because the normal shutdown phase is not gracefully performed on the failed node.
Automatic failover requires determining what groups were running on the failed node and which nodes should take ownership of the various resource groups. All nodes in the cluster that are capable of hosting the resource groups negotiate among themselves for ownership. This negotiation is based on node capabilities, current load, application feedback, or the node preference list. The node preference list is part of the resource group properties and is used to assign a resource group to a node. Once negotiation of the resource group is complete, all nodes in the cluster update their databases and keep track of which node owns the resource group.
In clusters with more than two nodes, the node preference list for each resource group can specify a preferred server plus one or more prioritized alternatives. This enables cascading failover, in which a resource group may survive multiple server failures, each time cascading or failing over to the next server on its node preference list. Cluster administrators can set up different node preference lists for each resource group on a server so that, in the event of a server failure, the groups are distributed amongst the cluster's surviving servers.
An alternative to this scheme, commonly called N+1 failover, sets the node preference lists of all cluster groups. The node preference list identifies the standby cluster nodes to which resources should be moved during first failover. The standby nodes are servers in the cluster that are mostly idle or whose own workload can be easily pre-empted in the event a failed server's workload must be moved to the standby node.
A key issue for cluster administrators when choosing between cascading failover and N+1 failover is the location of the cluster's excess capacity for accommodating the loss of a server. With cascading failover, the assumption is that every other server in the cluster has some excess capacity to absorb a portion of any other failed server's workload. With N+1 failover, it is assumed that the "+1" standby server is the primary location of excess capacity.
When a node comes back online, the Failover Manager can decide to move some resource groups back to the recovered node. This is referred to as failback. The properties of a resource group must have a preferred owner defined in order to failback to a recovered or restarted node. Resource groups for which the recovered or restarted node is the preferred owner will be moved from the current owner to the recovered or restarted node. Cluster service provides protection against failback of resource groups at peak processing times, or to nodes that have not been correctly recovered or restarted. Failback properties of a resource group may include the hours of the day during which failback is allowed, plus a limit on the number of times failback is attempted.
The Event Processor serves as the electronic switchboard sending events to and from applications and Cluster service components running on nodes in the cluster. The event processor helps cluster service components disseminate information about important events to all other components and supports the Cluster API eventing mechanism. The Event Processor performs miscellaneous services such as delivering signal events to cluster-aware applications and maintaining cluster objects.
The Communications Manager on each node maintains intra-cluster communication by continually communicating with the Cluster service running on other nodes by using RPC mechanisms. The Communications Manager guarantees reliable delivery of each intra-cluster message, delivery of messages in the correct order, and delivery of each message exactly once. Communication Manager also guarantees that messages from nodes that are no longer a member of the cluster or that are in offline state are ignored.
Global Update Manager
The Configuration Database Manager uses the update services provided by the Global Update Manager to replicate changes to the cluster database uniformly across all nodes. Global Update Manager guarantees that all nodes receive the configuration updates. Nodes that cannot, or fail to, commit the update are forced to leave the cluster and their state is changed to offline because they cannot be maintained in a consistent state with the rest of the nodes.
The Object Manager provides support for management of all cluster service objects. It allows for creation, search, enumeration, and reference counting on objects of different types.
Resource Monitors provide the communication interface between resource DLLs and the Cluster service. When the Cluster service needs to obtain data from a resource, the Resource Monitor receives the request and forwards it to the appropriate resource DLL. Conversely, when a resource DLL needs to report its status or notify the Cluster service of an event, the Resource Monitor forwards the information from the resource to the Cluster service.
Resource Monitor runs in a process separate from the Cluster service to protect the Cluster service from resource failures and to take action if the Cluster service fails. Resource Monitor can also detect Cluster service failure and responds by taking all of the resources and groups. By default, the Cluster service starts only one Resource Monitor to interact with all of the resources hosted by the node. However, one or more Resource Monitors can run on each node. This is determined by the resources and associated DLLs available on each node and administrator actions. The default single Resource Monitor can be overridden by an administrator using either Cluster Administrator or another management application.
Cluster service manages all resources as identical opaque objects by using Resource Monitors and resource DLLs. The Resource Monitor interface provides a standard communication interface that enables the Cluster service to initiate resource management commands and obtain resource status data. Actual command execution and data is obtained by the Resource Monitor through the resource DLLs. Cluster service uses resource DLLs to bring resources online, manage their interaction with other resources in the cluster, and—most importantly—to monitor their health to detect failure conditions.
Cluster service provides resource DLLs to support both Microsoft cluster-aware applications and generic non-cluster-aware applications from independent software vendors (ISVs) and third-party companies. Additionally, ISVs and third parties can provide resource DLLs that make their specific products cluster-aware. (For more information about available cluster-aware applications and hardware, see the section "For More Information.")
To enable resource management, a resource DLL needs only to expose a few simple resource interfaces and properties. Resource Monitor loads a particular resource DLL into its address space as privileged code running under the system account. The system account is an account used only by the operating system and services integrated with the base operating system. Using the system account enables Cluster service to perform various functions within the context of the operating system. For more information about the architecture of Windows 2000 or Windows NT system services, and account security, see: http://www.microsoft.com/ntserver/techresources/foundation/1_introduction.asp.
All resource DLLs provided by Microsoft for Microsoft cluster-aware applications run in a single Resource Monitor process. ISV or third-party resource DLLs will require their own resource monitor. Resource monitors are created by Cluster service as needed when a resource is installed or started on a cluster node.
When resources depend on the availability of other resources to function, these dependencies can be defined by the resource DLL. In the case where a resource is dependent on other resources, Cluster service will bring it online only after the resources on which it depends are brought online in the correct sequence.
Resources are taken offline in a similar manner. Cluster service takes resources offline only after any dependent resources have been taken offline. This prevents introducing circular dependencies when loading resources.
Each resource DLL can also define the type of computer and device connection that is needed by the resource. For example, a disk resource may require ownership only by a node that is physically connected to the disk device. Local restart policies and desired actions during failover events can also be defined in the resource DLL.
Resource DLLs provided with Windows NT Server 4.0, Enterprise Edition enable Cluster service to support the following resources:
File and print shares
Generic services or applications
Microsoft Distributed Transaction Coordinator (MSDTC)
Internet Information Services (IIS)
Network addresses and names
Windows 2000 Advanced Server and Windows 2000 Datacenter Server include resource DLLs for the following additional services:
Distributed File System (Dfs)
Dynamic Host Configuration Protocol (DHCP) service
Network News Transfer Protocol (NNTP)
Simple Message Transfer Protocol (SMTP)
Windows Internet Service (WINS)
Cluster-aware applications that provide their own resource DLLS and resource monitors enable advanced scalability and failover benefits. For example, a database server application with its own database resource DLL enables Cluster service to fail over an individual database from one node to another. Without the unique database resource DLL, the database application would be run on the cluster using the default generic server application resource DLL. When using the generic application server resource DLL, the Cluster service can only fail over an entire generic server application (and all its databases). Individual resource DLLs, however, such as the example database resource DLL, enable treating the database as a resource that can be monitored and managed by Cluster service. Thus, the application is no longer the only resource and failover unit that can be managed by Cluster service. This enables simultaneously running multiple instances of the application on different nodes in the cluster, each with its own set of databases. Providing resource DLLs that define application-specific resources is the first step towards achieving a cluster-aware application.
For information about creating a Cluster service resource DLL, see: http://msdn.microsoft.com/library/backgrnd/html/msdn_mscs_resource_dlls.htm.
A cluster is administered using the Cluster Administrator, a graphical administrator's tool that enables performing maintenance, monitoring, and failover administration. Additionally, Cluster service provides an automation interface that can be used to create custom scripting tools for administering cluster resources, nodes, and the cluster itself. Applications and administration tools, such as the Cluster Administrator, can access this interface using remote procedure calls (RPC) regardless of whether the tool is running on a node in the cluster or on an external computer. The administrative interface provides access to the cluster component managers described in this document to enable management of cluster entities such as nodes, resources, resource groups, and the cluster itself. For information about developing an administration tool using the automation interface, see the Windows Clustering section of the Platform Software Developer Kit (SDK): http://www.microsoft.com/msdownload/platformsdk/sdkupdate/.
For information about using Cluster Administrator, see the product help in Windows 2000 Advanced Server, Windows 2000 Datacenter, and Windows NT Server 4.0 Enterprise Edition.
Cluster Formation and Operation
When Cluster service is installed and running on a server, the server is available for participation in a cluster. Cluster operations will reduce single points of failure and enable high availability of clustered resources. The following sections briefly describe node behavior during cluster creation and operation.
Note: For information about installing Cluster service, see the Windows 2000 and Windows NT Server 4.0, Enterprise Edition product help and deployment guides.
Creating a Cluster
Cluster service includes a cluster installation utility to install the cluster software on a server and to create a new cluster. To create a new cluster, the utility is run on the computer selected to be the first member of the cluster. This first step defines the new cluster by establishing a cluster name and creating the cluster database and initial cluster membership list.
The next step towards creating a cluster is adding the common data storage devices that will be available to all members of the cluster. This establishes the new cluster with a single node and with its own local data storage devices and the cluster common resources—generally disk or data storage and connection media resources.
The final step in creating a cluster is running the installation utility on each additional computer that will be a member in the cluster. As each new node is added to the cluster, it automatically receives a copy of the existing cluster database from the original member of the cluster. When a node joins or forms a cluster, Cluster service updates the node's private copy of the configuration database.
Forming a Cluster
A server can form a cluster if it is running Cluster service and cannot locate other nodes in the cluster. To form the cluster, a node must be able to acquire exclusive ownership of the quorum resource. The quorum resource maintains data integrity and cluster unity and plays a critical role in cluster operations. It must be present for node operations—such as forming or joining a cluster—to occur. The quorum resource is a physical disk in the common cluster disk array and has the following attributes:
Supports low-level commands for persistent ownership arbitration enabling a single node to gain and defend physical control of the quorum resource. For example, the SCSI disk Reserve and Release commands enable persistent arbitration.
Can be accessed by any node in the cluster.
Can be formatted using NTFS.
The quorum resource performs the role of tiebreaker when a cluster is formed, or when network connections between nodes fail. When a cluster is initially formed, the first node in the cluster contains the cluster configuration database. As each additional node joins the cluster, it receives and maintains its own local copy of the cluster configuration database. The quorum resource on the common cluster device stores the most current version of the configuration database in the form of recovery logs that contain node-independent cluster configuration and state data.
During cluster operations, the Cluster service uses the quorum recovery logs to perform the following:
Guarantee that only one set of active, communicating nodes is allowed to form a cluster.
Enable a node to form a cluster only if it can gain control of the quorum resource.
Allow a node to join or remain in an existing cluster only if it can communicate with the node that controls the quorum resource.
From the point of view of other nodes in the cluster and the Cluster service management interfaces, when a cluster is formed, each node in the cluster may be in one of three distinct states. These states are recorded by the Event Processor and replicated by the Event log Manager to other clusters in the node. Cluster service states are:
Offline. The node is not a fully active member of the cluster. The node and its cluster service may or may not be running.
Online. The node is a fully active member of the cluster. It honors cluster database updates, contributes votes to the quorum algorithm, maintains heartbeats, and can own and run resource groups.
Paused. The node is a fully active member of the cluster. It honors cluster database updates, contributes votes to the quorum algorithm, and maintains heartbeats, but it cannot accept resource groups. It can only support those resources groups for which it currently has ownership. The paused state is provided to allow certain maintenance to be performed. Online and paused are treated as equivalent states by the majority of the Cluster service components.
Joining a Cluster
To join an existing cluster, a server must be running the Cluster service and must successfully locate another node in the cluster. After finding another cluster node, the joining server must be authenticated for membership in the cluster and receive a replicated copy of the cluster configuration database.
The process of joining an existing cluster begins when the Windows 2000 or Windows NT Service Control Manager starts Cluster service on the node. During the start-up process, Cluster service configures and mounts the node's local data devices. It does not attempt to bring the common cluster data devices online as nodes because the existing cluster may be using the devices.
To locate other nodes, a discovery process is started. When the node discovers any member of the cluster, it performs an authentication sequence. The first cluster member authenticates the newcomer and returns a status of success if the new server is successfully authenticated. If authentication is not successful, in the case where a joining node is not recognized as a cluster member, or has an invalid account password, the request to join the cluster is refused.
After successful authentication, the first node online in the cluster checks the copy of the configuration database on the joining node. If it is out-of-date, the cluster node that is authenticating the joining server sends to it an updated copy of the database. After receiving the replicated database, the node joining the cluster can use it to find shared resources and bring them online as needed.
Leaving a Cluster
A node can leave a cluster when it shuts down or when the cluster service is stopped. However, a node can also be forced to leave (is evicted) when the node fails to perform cluster operations, such as failure to commit an update to the cluster configuration database.
When a node leaves a cluster in the event of a planned shutdown, it sends a ClusterExit message to all other members in the cluster, notifying them that it is leaving. The node does not wait for any responses and immediately proceeds to shut down resources and close all cluster connections. Because the remaining nodes received the exit message, they do not perform the same regroup process to reestablish cluster membership that occurs when a node unexpectedly fails or network communications stop.
When a node is evicted, for example by a manual operation from Cluster Administrator, the node status is changed to evicted.
Failure detection and prevention are key benefits provided by Cluster service. When a node or application in a cluster fails, Cluster service can respond by restarting the failed application or dispersing the work from the failed system to surviving nodes in the cluster. Cluster service failure detection and prevention includes bi-directional failover, application failover, parallel recovery, and automatic failback.
Cluster service dynamically detects failures of individual resources or an entire node and dynamically moves and restarts application, data, and file resources on an available, healthy server in the cluster. This allows resources such as database, file shares, and applications to remain highly available to users and client applications.
Cluster service is designed with two different failure detection mechanisms for detecting failures:
Heartbeat for detecting node failures.
Resource Monitor and resource DLLs for detecting resource failures.
Detecting Node Failures
Periodically, each node exchanges datagram messages with other nodes in the cluster using the private cluster network. These messages are referred to as the heartbeat. The heartbeat exchange enables each node to check the availability of other nodes and their applications. If a server fails to respond to a heartbeat exchange, the surviving servers initiate failover processes including ownership arbitration for resources and applications owned by the failed server. Arbitration is performed using a challenge and defense protocol.
Failure to respond to a heartbeat message can be caused by several events, such as computer failure, network interface failure, or network failure. Normally, when all nodes are communicating, Configuration Database Manager sends global configuration database updates to each node. However, when a failure on a heartbeat exchange occurs, the Log Manager also saves configuration database changes to the quorum resource. This ensures that surviving nodes can access the most recent cluster configuration and local node registry key data during recovery processes.
Detecting Resource Failures
The Failover Manager and Resource Monitors work together to detect and recover from resource failures. Resource Monitors keep track of resource status by periodically polling resources using the resource DLLs. Polling involves two steps, a brief LooksAlive query and longer, more detailed IsAlive query. When the Resource Monitor detects a resource failure, it notifies the Failover Manager and continues to monitor the resource.
The Failover Manager maintains resources and resource group status. It is also responsible for performing recovery when a resource fails and will invoke Resource Monitors in response to user actions or failures.
After a resource failure is detected, the Failover Manager can perform recovery actions that include either restarting a resource and its dependent resources or moving the entire resource group to another node. Which recovery action is performed is determined by resource and resource group properties and node availability.
During failover, the resource group is treated as the failover unit, to ensure that resource dependencies are correctly recovered. Once a resource recovers from a failure, the Resource Monitor notifies the Failover Manager, which can then perform automatic failback of the resource group, based on the configuration of the resource group failback properties.
As Windows-based products evolve, the future development of Cluster service will focus on the following key areas:
Certification and support for even larger multi-node cluster configurations.
Easier installation and verification of cluster configurations, including support for new types of hardware.
Simpler, more powerful management of cluster-based applications and services, including continued focus on scripted, remote, and "lights out" management.
Extension of cluster-based availability and scalability benefits to even more system services.
Tighter integration of the infrastructure and interfaces of all Windows-based clustering technologies to enhance performance, flexibility, and manageability.
Continued support for third-party ISVs and corporate developers to simplify the development, installation, and support of cluster-aware applications, both for higher availability and for higher scalability.
Note: Third-party developers can create unique, cluster-aware quorum resource types that meet the above requirements. For information about developing cluster-aware products, see "Platform SDK Components for Windows Base Services Developers" on MSDN Online: http://msdn.microsoft.com/developer/sdk/winbase.asp.
For More Information
Windows NT Microsoft Cluster Server, by Richard R. Lee, Osborne McGraw-Hill, 1999.
Windows NT Cluster Server Guidebook, by David Libertone, Prentice Hall, 1998.
Windows NT Backup & Recovery, by John McMains and Bob Chronister, Osborne McGraw-Hill, 1998.
Windows NT Clustering Blueprints, by Mark A. Sportack, SAMS Publishing, 1997.
In Search of Clusters, Second Edition: The Coming Battle in Lowly Parallel Computing, Gregory F. Pfister, Prentice Hall, 1998, ISBN: 0138997098.
The Book of SCSI, Peter M. Ridge, No Starch Press, 1995, ISBN: 1886411026.
Transaction Processing Concepts and Techniques, Gray, J., Reuter A., Morgan Kaufmann, 1994. ISBN 1558601902, survey of outages, transaction techniques.
You can also visit the Microsoft Web site to learn more about any of the Windows clustering technologies.
For information about the Windows 2000 Server family of products, see http://www.microsoft.com/windows2000/server/default.asp.
For information about Windows 2000 Server Reliability and availability, see http://www.microsoft.com/windows2000/server/evaluation/business/overview/reliable/default.asp.
For information about Windows Clustering Technologies, see http://www.microsoft.com/windows2000/technologies/clustering/default.asp.
For a list of cluster-aware products from Microsoft partners, see http://www.microsoft.com/ntserver/partners/findoffering/serversolutions/partnerlist.asp.
For documentation about the architecture of Windows base services, including Windows Clustering technologies, see Base Services in the Platform Software Developer Kit (SDK) http://msdn.microsoft.com/library/default.htm.