Configure a Three-Tier Deployment Architecture Using ARR

Updated: November 5, 2009

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

This topic describes how to use Application Request Routing (ARR) to configure a three-tier deployment architecture that consists of a Web tier, an application server tier, and a data tier. In this deployment architecture, the ARR server delivers static content while forwarding requests for dynamic content to the application servers. The following procedure will change your URL rewrite rules to filter for static requests.

To configure a three-tier deployment architecture, you must have IIS 7 installed on a computer running Windows Server® 2008 or newer, ARR and its dependent modules, a minimum of two application servers with working sites and applications, and static content available on the ARR server. Use the procedure in Define and Configure an ARR Server Farm to create a server farm before proceeding.

To enable a three-tier deployment architecture, you must change the URL rewrite rules so that requests for certain extensions or paths are served directly from the ARR server. Static requests are identifiable by their file extensions, such as .jpg or .gif. URL rewrite rules can also identify static resources by looking in the URL for the path in which the resources are contained, for example, in the /images/ path.

You can change your URL rewrite rules to filter for static requests by using the UI or by using the command line.

  1. Open IIS Manager.

  2. In the Connections pane, expand the server node and then expand the Server Farms node. Select your server farm.

  3. In the Server Farm pane, double-click Routing Rules.

  4. On the Routing Rules page, do the following:

    • In the Requests with the following extensions are not forwarded box, enter *.jpg and *.css, separated with a comma.

    • In the Requests with the following patterns are not forwarded box, enter*/image/*.

  5. To verify that static images are being served from the ARR server, inspect the log files located at c:\inetpub\logs\LogFiles\. On application servers behind the ARR server, you should not see any requests that reference *.jpg, *.css, or */images/* in the log file.

  1. Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.

  2. To clear all URL rewrite rules, enter the following command:

    appcmd.exe clear config –section:system.webServer/rewrite/globalRules

  3. To change the routing rules so that requests for resources with the extensions *.jpg and *.css and a path that matches */images/* are not forwarded to the application servers, enter the following commands:

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /+"[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing=

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].match.url:"*"  /commit:apphost

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /+"[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].conditions.[input='EXT_{URL}',negate='True',pattern='*.jpg']" /commit:apphost

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /+"[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].conditions.[input='EXT_{URL}',negate='True',pattern='*.css']" /commit:apphost

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /+"[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].conditions.[input='{URL}',negate='True',pattern='*/images/*']" /commit:apphost

    appcmd.exe set config  -section:system.webServer/rewrite/globalRules /[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].action.type:"Rewrite" /[name='ARR_serverFarmName_loadbalance',patternSyntax='Wildcard',stopProcessing='True'].action.url:"http://serverFarmName/{R:0}"  /commit:apphost

    where serverFarmName is the name of your server farm.

See Also

Community Additions

ADD
Show: