Windows Server 2012 / 2012 R2 - Create a web servers cluster with NLB

Page 1 / 5

On Windows Server, load balancing is very easy thanks to a native feature called Network Load Balancing (NLB).
With NLB, you can also perform fault tolerance as NLB will automatically detect the unavailability of a cluster member host.

  1. Configuration used
  2. Installing web servers
  3. Set the network to private
  4. Test of access to web servers
  5. Installing Network Load Balancing (NLB)
  6. Create a NLB cluster
  7. Add a host to the cluster
  8. IP address added to cluster servers
  9. Cluster access test
  10. Installing and configuring a local DNS server
    1. Create the forward lookup zone
    2. Create the reverse lookup zone
    3. Configuring the cluster DNS record
    4. Cluster access test with the DNS name
  11. Using the DNS zone of an Active Directory
  12. Configure your IIS web server for HTTPS support through the cluster

1. Configuration used

For this tutorial, we will use 2 servers with fixed IPs, because DHCP is not supported by NLB and is automatically disabled when creating the cluster.

  • server 1 named "web-srv1" with this IP :
  • server 1 named "web-srv2" with this IP :

For access from client PCs, we will test with a Windows 8 PC.

Note that in production, the configuration of server members of a cluster must be strictly identical for the user experience is optimal and to prevent strange problems occur.

Important : NLB only supports TCP/IP. So, IPX (for example) is not supported.

2. Installing web servers

To show you how to create your 1st NLB cluster, we will create a web server cluster.
Nevertheless, note that putting clustered web servers requires is much more complicated, because you will have to duplicate and synchronize your database servers, your file servers, ... so that the distribution of the network load is optimal.

In our case, we will consider that the website has simply been copied/pasted from one server to another and that it's a static website.

To get started, start the Add Roles and Features wizard.

Install the "Web Server (IIS)" role on your 2 servers.

Once installed, you will find the default web site files in this folder : C:\inetpub\wwwroot

Create a "test.html" file in this folder.

And specify "server 1" for the file created on server 1, and "server 2" for the other server.
This will let you know on which server you have arrived.

Note : of course, in production, this will never be the case.

3. Set the network to private

In order for your web servers to be accessible from your local network, the network mode used by Windows Server must be: private or domain.

To find out, open the "Network and Sharing" center.

If this is not the case, open the file explorer and go to "Network".
Next, click the "Network discovery and file sharing are turned off" message, and then click "Turn on network discovery ...".

Click on "No, make the network that I am connected to a private network".

Now, Windows Server will use the private network mode.

4. Test of access to web servers

Before you create the cluster, make sure that you are able to remotely access your web servers.