Using Web Farm Technology to Provide High Availability for Message Queuing

Updated: June 25, 2007

Applies To: Windows Server 2008

To increase the availability and scalability of Web server resources, a Web farm is often deployed as a collection of independent servers, to which all HTTP incoming requests are directed. Network Load Balancing clusters, DNS round robin, and network address translation (NAT) are typically used to deploy Web farm capability.

Message Queuing services can be implemented in an Network Load Balancing cluster. Network Load Balancing clusters distribute client connections over multiple servers, providing scalability and high availability for client requests for services and applications, but they do not have failover capabilities. In its most common implementation, Network Load Balancing distributes incoming TCP/IP traffic between multiple Internet Information Services (IIS) servers, which comprise a Web farm. Network Load Balancing can combine up to 32 servers running Windows Server 2008 or later into a single load-balancing cluster. Servers can be added without shutting down the cluster.

The heart of Network Load Balancing is the WLBS driver, which is loaded into each member server, or host, in the cluster. This driver includes the statistical mapping algorithm that the cluster hosts collectively use to determine which host handles each incoming request.

Under this type of clustering, if a host fails or goes offline, Network Load Balancing automatically reconfigures the cluster to redirect subsequent client requests to hosts that are still viable members of the cluster. Any client connections that were open when the host failed or went offline are ended. On retry, the client connection is routed to a viable host. The downtime for client connections is less than 10 seconds.

Network Load Balancing allows all computers in the cluster to be addressed by the same set of cluster Internet Protocol (IP) addresses, while also maintaining their existing, dedicated IP addresses. This feature transparently distributes client requests among the hosts in the cluster, using virtual Internet Protocol (IP) addresses. You must run IIS 7.0 or another TCP/IP service on each host, and the hosts must serve the same content so that any of them can handle any request. You can copy updated pages to local disks on the hosts, or you can use commercial file-replication software to perform updates. Network Load Balancing allows you the option of specifying that all connections from the same client IP address be handled by a particular server (unless, of course, that server fails). It also permits you to allocate all requests from a Class C address range to a single server.

When you set up a Web farm using Network Load Balancing, each server is in constant communication with all the others. They exchange performance statistics and divide the responsibilities of handling incoming requests. Every incoming request is seen by every server in the farm, and Network Load Balancing has its own algorithm to determine which server will handle each request.

When messages are sent over HTTP transport to a queue at a virtual URL address, a TCP session is established with one of the nodes in the cluster. Messages can be sent only to destinations specified by direct format names. In the case of express and recoverable messages, the receiver is not required to maintain any internal state, and Message Queuing does not guarantee exactly-once delivery through a Web farm, although a best-effort attempt is made by means of a lightweight nonpersistent duplicate removal mechanism. When transactional messages are sent over HTTP transport, in-order delivery is guaranteed by including an SRMP stream header entry that includes information for message sequencing. For more information, see HTTP Message Redirection.

When a session between a client and a node is disconnected and the client is routed to a different node for the next session, the messages whose delivery was not acknowledged are resent by the client and accepted by the new node with the possible creation of duplicates.

Message Queuing applications can be deployed on the nodes of an Network Load Balancing cluster to receive and process messages sent to the cluster.

Microsoft DNS server supports a process referred to as round-robin distribution, a common session-based load balancing technique that balances the number of clients connecting to an Internet site supported by multiple servers. Round-robin distribution is specified by RFC 1794. With DNS round-robin, a single logical DNS name (such as www.microsoft.com) maps to several IP addresses. When a request is made to resolve the DNS name, the DNS server sends back one of the addresses from the list. Each time a request is made for this DNS name, the DNS server rotates the addresses in round-robin fashion to distribute the set of users across a set of servers. Thus, different users requesting the same DNS name are given different IP addresses to balance the load.

This technique distributes incoming requests evenly among the available IP addresses but does not fully balance the load because it is not interactive. This is because the DNS server does not monitor the loading of each IP address nor does it check whether a particular server is currently running. Round-robin distribution can be a useful starting point for small groups of servers. If you are using round-robin distribution, closely monitor your servers so that you can quickly remove any failed machines from the distribution list.

Network address translation (NAT) is a protocol that allows a network with private addresses to access information about the Internet through an IP translation process. NAT can be used to configure a small network to share a single connection to the Internet.

Community Additions

ADD
Show: