Install Load Balancing (optional)

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Mar/2016, at 18:34

You can load balance HTTP requests across several content servers using Application Request Routing, as shown below:

loadbalancing0

Hardware Prerequisites

1 Server ARR front server

1 server Farm (2 servers minimal)

Software Prerequisites

IIS 7.0 on Windows 2008 or newer on all servers

GN4/Tark4 web application on all Application servers in the farm

Microsoft Application Request Routing 2.5

Step 1 – Software installation

Install Application Request Routing on all servers.

Install GN4/Tark4 web application on all Application servers in the farm.

You can download the Application Request Routing v2.5 from the following link: http://www.microsoft.com/web/gallery/install.aspx?appid=ARRv2_5

Step 2 – Create a server farm in Application Request Routing

1. Launch IIS Manager on the ARR front server.

2. Application Request Routing is a server level feature. Select and expand the root of the server.

loadbalancing1

3. To create a server farm, right-click Server Farms, and then select Create Server Farm....

loadbalancing2

4. Enter a name for the server farm. In the example below, myServerFarm is the name of the server farm. Click Next.

loadbalancing4

5. The next step is to add all the application servers to the server farm. On the Add Server page of the wizard, add as many application servers as needed. Click Finish to create the server farm with the entered application servers as the server farm members. (Note: Advanced options... allow you to configure the HTTP and HTTPS ports to non-standard (80 for HTTP and 443 for HTTPS) ports:

loadbalancing5

6. You have successfully created a server group with application servers as its members.

Step 3 – Verify URL rewrite rules

1. Launch IIS Manager.

2. Select the server farm, myServerFarm, which was created in Step 2 – Create a server farm in Application Request Routing.

3. The following icons are shown:

loadbalancing6

4. Double-click Routing Rules.

5. Verify that the Use URL Rewrite to inspect incoming requests checkbox is checked.

loadbalancing7

6. SSL offloading is enabled by default. When this feature is enabled, all communication between the ARR server and the application servers are done in clear text, even for HTTPS requests from clients to the ARR server. When both the ARR server and the application servers are deployed within a trusted network, such as within the same datacenter, enabling SSL offloading does not sacrifice security. Also, enabling this feature can further help to maximize the server resources on the application servers, since they do not have to spend cycles in encrypting and decrypting requests and responses. To disable SSL offloading, uncheck the Enable SSL offloading checkbox, and then click Apply.

7. Open a browser and send several requests to the ARR server.

8. To verify that the requests are being load balanced equally between the application servers, select myServerFarm. Double-click Monitoring and Management.

loadbalancing8

9. In the dashboard view, verify that the requests are being evenly distributed.

loadbalancing9

Step 4 – Configure the Load Balance algorithm

1. Launch IIS Manager.

2. Select the server farm, myServerFarm, which was created in Step 2 – Create a server farm in Application Request Routing.

3. The following icons are shown:

loadbalancing8

4. Double-click Load Balance.

5. In Load Balance algorithm select Weighted round robin.

6. In Load distribution select Event distribution.

7. Click Apply.

loadbalancing10

Step 5 – Configure client affinity

Application Request Routing provides a client affinity feature that maps a client to a content server behind Application Request Routing for the duration of a client session. When this feature is enabled, the load balancing algorithm is applied only for the very first request from the client. From that point on, all subsequent requests from the same client would be routed to the same content server for the duration of the client session. This feature is useful if the application on the content server is stateful and the client’s requests must be routed to the same content server because the session management is not centralized.

1. Launch IIS Manager.

2. Select the server farm, myServerFarm, which was created in Step 2 – Create a server farm in Application Request Routing.

3. The following icons are shown:

loadbalancing8

4. Double-click Server Affinity.

5. Check the Client affinity checkbox

6. Check the Use host name checkbox

7. In Host name affinity provider select Microsoft.Web.Arr.HostNameRoundRobin.

8. Click Apply.

loadbalancing11

Application Request Routing uses a cookie to enable client affinity. The Cookie name will be used to set the cookie on the client. That said, the client must accept cookies for client affinity to work properly.

9. To verify the functionality of client affinity, send several requests to the ARR server. Refresh the dashboard in IIS Manager (Monitoring and Management). Verify that the runtime statistics are changing for only one of the application servers to where the client is affinitized. You may want to send additional requests and refresh the dashboard, as needed.