how to use and configure the new functionality in iis application request routing v. 2.0

Upload: kchatla

Post on 04-Jun-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    1/13

    How to Use and Configure the New Functionalityin IIS Application Request Routing v. 2.0

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    2/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Table of Contents

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0 .... 1Exercise 1 Configuring Disk Cache ................................................................................................................................. 2Exercise 2 ARR Cache Nodes Hierarchy/Chain .............................................................................................................. 4Exercise 3 Disk Caching Smooth Streaming Content ..................................................................................................... 6Exercise 4 Deleting Cached Content ............................................................................................................................ 10

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    3/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 1 of 11

    Objectives After completing this lab, you will be better able to:Configure and enable a disk cache in application request routingConfigure ARR disk cache hierarchyManage cached contentSet up disk caching of Smooth Streaming content

    Scenario In this lab, you will configure disk caching within an application request routinginfrastructure. You will also go through a process of setting up a tree-likestructure of Application Request Routing (ARR) cache servers in which the cacheservers will serve the end user in hierarchy in order to decrease the load on theorigin server, that is, our Live Smooth Streaming server. You will also learn howto delete cached content from the ARR cache servers.

    Estimated Time toComplete This Lab

    60 Minutes

    Computers used in thisLab DC

    WEB-01

    WEB-02

    WEB-03

    The password for the Administrator account on all computers in this lab is:

    pass@word1

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    4/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 2 of 11

    Exercise 1Configuring Disk Cache

    ScenarioIn this exercise, we will first add the server farm, then configure and enable disk cache for ARR.

    Tasks Detailed Steps

    Complete the followingtask on:

    WEB-031. Set up a server farm

    a. Log on to the WEB-03 virtual machine.b. Click Start , then Internet Information Services (IIS) Manager .c. In IIS Manager , expand NYC-WEB-03 in the left pane.d. Right-click Server Farms , then click Create Server Farm .e. Type SharedServers in the Server farm name box, and then click Next .f. Type NYC-DC-01 in the Server address box, click Add , andthen click Finish .

    g. Click Yes to confirm the creation of URL Rewrite rules.Complete the followingtask on:

    WEB-032. Configure primary

    disk cache location

    a. In IIS Manager , click NYC-WEB-03 , and then double-click Application RequestRouting Cache under the IIS category on the menu window.

    b. In the Actions pane, click Add under the Drive Management category.c. In the Add Drive

    to use as the cache drive. In this case, browse to C:\DiskCache . Click OK to selectthis folder.

    d. Type 10 in the Maximum size box.e. Click OK and the newly added disk will appear in the list.

    Complete the followingtask on:

    WEB-033. Configuring

    secondary diskcache location

    a. In the Actions pane, click Add Secondary under the Drive Management category.b. In the Add Secondary Drive dialog box, type \\ NYC-DC-01\DiskCache2 in the

    Drive Location box. You will use this directory on your network as the secondarycache drive in order to emulate an external disk setup which is normally doneusing SAN.

    c. Click OK to save the changes.

    Complete the followingtask on:

    WEB-034. Enable disk cache

    a. In IIS Manager , click NYC-WEB-03 in the left pane, and then expand Server Farms .b. Click SharedServers , and then double-click Caching under the Server Farm

    category.c. Ensure that the Enable disk cache checkbox is selected.

    Complete the followingtask on:

    WEB-035. Verify the cache

    functionality

    a. In IIS Manager , in the left pane, expand Server Farms if necessary.b. Click SharedServers in the left pane.c. Double-click Monitoring and Management . This screen will populate the server

    farm-level runtime statistics, that is, the cache hit/miss ratio, as well as how muchbandwidth has been saved because of the ARR disk cache.

    d. Open Internet Explorer and browse to http:/ / localhost . Switch to the IISManager window and refresh the Monitoring and Management console, whereyou will now see the number of requests and response size.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    5/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 3 of 11

    Tasks Detailed Steps

    e. Using Windows Explorer, browse to C:\DiskCache\ and you will see the contentbeing cached.

    Complete the followingtask on:

    WEB-036. Remove the server

    farm

    Note: You will perform the following steps so that the configurations done in theprevious exercise do not hinder the upcoming configurations in this demo.a. Under NYC-WEB-03 , click Server Farms , and then click SharedServers .

    b. Click Remove Server Farm in the Actions pane on the right side.c. Click Yes to confirm.d. In IIS Manager , click NYC-WEB-03 .e. Double-click URL Rewrite under the IIS category on the menu window.f. Make sure that the URL Rewrite list is empty. If you find any rule created, select

    it, and then click Remove from the Actions pane on the right side.Note: At this stage you should be all set to perform the next exercise. This step wasnecessary because the next exercise involves the creation of a new server farm with adifferent disk cache.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    6/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 4 of 11

    Exercise 2ARR Cache Nodes Hierarchy/Chain

    ScenarioIn this exercise, you will configure a child/edge cache node and a parent cache node in a two-tier cache hierarchydeployment.

    Tasks Detailed Steps

    Complete the followingtask on:

    WEB-021. Pre-setup

    verification

    Note: Your content delivery network (CDN) consists of three servers and a clientmachine. Each server in the network has a different role as defined as below:a. Origin server: DC will act as an origin server which will stream a movie to be

    accessed by the client node.b. ARR parent node: WEB-03 will act as the parent node which will either return

    cached content or get the content from the origin server as per the request from

    client node.c. ARR child node: WEB-01 will act as a child node which the clients will access to

    view the streaming movie.d. Client machine: You will use WEB-02 as a client machine.

    Complete the followingtask on:

    WEB-022. Set up the parent

    farm

    a. Log on to the WEB-02 virtual machine. Click the WEB-02 virtual machine windowto make the window active, press CTRL+ALT+END, and then log on aswoodgrovebank\Administrator , using the password pass@word1 .

    b. Before you start configuring the farm, verify the behavior:c. Start Internet Explorer , type http://nyc-web-01 in the address bar, and then

    press ENTER.d. You will see a default.html page displaying the text Home page from NYC-WEB-

    01 . This means that the page is being fetched from the WEB-01.e. Log on to the WEB-01 virtual machine.f. On WEB-01 , click Start , and then click Internet Information Services (IIS)

    Manager .g. Expand NYC-WEB-01 .h. Right-click Server Farms , and then click Create Server Farm .i. Type ParentFarm in the Server farm name field, and then click Next .

    j. Type NYC-WEB-03 in the Server address field. Click Add , and then click Finish .k. Click Yes to confirm the creation of URL Rewrite rules.Note: At this point you have added a single server as the parent node of this ARR childserver. Creating a server farm signifies that you may add multiple parent ARR servers

    as well. All the parent ARR servers will share one set of configurations whereas all thechild ARR servers will share another set of configurations.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    7/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 5 of 11

    Tasks Detailed Steps

    Complete the followingtask on:

    WEB-01

    3. Enable cache arrayrouting protocol

    a. In IIS Manager , expand WEB-01 if necessary, and then click and expand theServer Farms tree.

    b. Click ParentFarm in the left pane, and then double-click Load Balance in thecenter pane.

    c. Select Request hash from the drop-down list. The request hash in ARR Version 2uses CARP.

    d. Click Apply in the Actions paneto save the changes.

    Complete the followingtask on:

    WEB-014. Configure primary

    and secondary diskcache locations

    a. In IIS Manager , click NYC-WEB-01 , and then double-click Application RequestRouting Cache under the IIS category on the menu window.

    b. In the Actions pane, click Add under the Drive Management category.c. In the Add Drive dialog box, click the ellipsis button ( ) and browse to a

    directory to use as the cache drive (in this case, C:\DiskCache ). Click OK to selectthe folder.

    d. Type 10 in the Maximum size field.e. Click OK , and the newly added disk will appear in the list.f. In the Actions pane, click Add Secondary under the Drive Management category.

    g. In the Add Secondary Drive dialog box, type \\ NYC-DC-01\DiskCache2 .h. Click OK , and the newly added disk will appear in the list.

    Complete the followingtask on:

    WEB-025. Verify the parent

    farm

    a. Switch to the WEB-02 machine.b. Open another instance of Internet Explorer , type http://nyc-web-01 in the

    address bar, and then press ENTER.c. Note: You will see a default.html page displaying the text Home page from NYC-

    WEB-03 . This signifies that the page is being fetched from the parent server,WEB-03 , set up in the previous step. Compare this result with the first step in

    Task 2.

    Complete the followingtask on:

    WEB-016. Verify the cache

    functionality

    a. Switch to the WEB-01 machine.b. In IIS Manager , click NYC-WEB-01 , and then click Server Farms .

    c. Click ParentFarm in the left pane.d. Double-click Monitoring and Management . On this screen you can view the

    server farm-level runtime statistics, including the cache hit/miss ratio, and howmuch bandwidth has been saved due to ARR disk cache.

    e. To see some activity on this window, start Internet Explorer and browse tohttp:/ / localhost . Then refresh the Monitoring and Management console to seethe number of requests and response size.

    Note: You may repeat Step 5 as often as you like to observe the bandwidth savingstatistics in the Monitoring and Management console. Additionally, you could log onto WEB-03 and open the ARR feature to observe that there is only a single requestbeing processed by this server. This ensures that once the content has been cached, itis being served by NYC-WEB-01 instead of routing to NYC-WEB-03 for every request.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    8/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 6 of 11

    Exercise 3Disk Caching Smooth Streaming Content

    ScenarioIn this exercise, you will create URL rewrite rules on the child/edge cache node and then configure the parentcache node. These are the final steps in the process of setting up the origin server. You will create, configure, andstart a smooth streaming Publishing Point on the origin server and then try to access it from the client machine,NYC WEB 02. This setup will decrease load on the origin server by caching the content into a hierarchy of parentand child cache nodes.

    Tasks Detailed Steps

    Complete the followingtask on:

    WEB-011. Create URL Rewrite

    Rules on thechild/ edge cachenode

    Note: Content delivery networks need more work than just the creation of serverfarms. Child and parent cache nodes need to have appropriate rewrite rules in orderto be able to search effectively for the origin server. The rewrite rule generated by thecreation of the server farm is not sufficient for a CDN/ECN deployment because thecache nodes are tiered. When there is a cache miss at the parent cache tier, the nexttier of cache nodes (the parent cache nodes) would not know how to find the originservers.Fo NYC-DC-01 and the contentis cached in the hierarchy of ARR cache servers NYC-WEB-01 (child cache) andNYC-WEB-03 (parent cache). If a certain requested image is not found on any cachenode, and the URL rewrite rules are not present on the cache nodes, then the childcache node will request the image from the parent node, and the parent node will notknow where to find the image. So the URL rewrite rules allow the parent server tolook for the origina. An origin server is a media-streaming server or a content server of our content

    delivery network. In your case, the origin server is NYC-DC-01 . Perform thefollowing steps to configure rewrite rules on your child/edge cache node.

    b. Switch to the WEB-01 virtual machine.c. In IIS Manager , click NYC-WEB-01 .d. Double-click URL Rewrite under the IIS category from the menu window on the

    right side.e. Select the Rewrite rule that was created after the creation of the new server

    farm.f. In the Actions pane, click View Rewrite Maps .g. In the Actions pane, click Add Rewrite Map .h. In the Add Rewrite Map dialog box, name the rewrite map OriginServers .

    i. Click OK . j. In the rewrite map, you will explicitly identify the mapping between the host

    name that the child cache node receives and the corresponding origin hostnames. In the Actions pane, click Add Mapping Entry .

    k. In the Add Mapping Entry dialog box, you will add the host name that the childcache node receives in the original value and then type the origin host name inthe new value. In the Original value box, type NYC-WEB-02 , and then in the Newvalue box, type NYC-DC-01 . Click OK .

    l. In the Actions pane, click Add Mapping Entry .

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    9/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 7 of 11

    Tasks Detailed Stepsm. In the Original value box, type Localhost , and then in the New value box, type

    NYC-DC-01 . Click OK .n. In the Actions pane, click Add Mapping Entry .o. In the Original value box, type NYC-WEB-01 , and then in the New value box, type

    NYC-DC-01 . Click OK .

    p. In the Actions pane, click Edit Map Settings .q. In the Edit Rewrite Map dialog box, type # as the Default value for this rewrite

    map.r. Click OK .s. Click Back to Rules from the Actions pane.t. Locate and select ARR_ParentFarm_loadbalance .u. In the Actions pane, click Edit .v. Click Add Conditions to add two rules. You may have to scroll the center pane to

    the right to view this properly.w. The first rule will use the OriginServers rewrite map that you created in Step 7.

    The second rule, which you will now create, will match the host header as the key

    to match the entries in OriginServers. Click Add, then in the Add Condition dialogbox, type the following values:x. Condition input: {OriginServers:{HTTP_HOST}}y. Check if input string: Matches the patternz. Pattern: *aa. Ignore Case: Selectedbb. Click OK .cc. The second rule will set the default value as #when the host header does not

    match the entries in OriginServers. #is not a valid character and cannot be usedas a host name. The following rule is used later to ensure that only the customers(as represented by host names) in OriginServers are serviced by ARR. Click Add,then in the Add Condition dialog box, type the following values:

    dd. Condition input: {C:1}ee. Check if input string: Does not match the patternff. Pattern: #gg. Ignore Case: Selectedhh. Click OK .ii. Select the Track capture groups across conditions check box.

    jj. To set the HTTP_HOST values to match the conditions above, scroll the centerpane to see the Action section and click Server Variables .

    kk. In the Server Variables dialog box, type the following values to reset HTTP_HOST:ll. Name: HTTP_HOSTmm. Value: {C:1}nn. Replace: Checkedoo. Click OK to save the changes.pp. In the Actions pane, click Apply .Note: The focus on the previous steps was to understand the URL rewrite rules on thechild/edge cache node. The next steps will focus on the parent cache node so that youget an understanding of how these two work together in a hierarchy.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    10/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 8 of 11

    Tasks Detailed Steps

    Complete the followingtask on:

    WEB-032. Configure the parent

    cache node

    Note: The parent cache node is, for the most part, configured as a forward proxy.a. Switch to the WEB-03 machine.b. In IIS Manager , click NYC-WEB-03 and then double-click Application Request

    Routing Cache under the IIS category on the menu window.c. Click Server Proxy Settings in the Actions pane.

    d. Select the Enable proxy checkbox, and then click Apply in the Actions pane. Youhave just enabled ARR as a proxy at the server level.

    e. Click NYC-WEB-03 again, and then double-click URL Rewrite .f. Click Add Rules in the Actions pane.g. Select Blank Rule .h. Click OK .i. Type the following values, and then save the rule:

    j. In the Name box, type Forward proxy .k. In the Using list, select Wildcards (to view this properly you may have to scroll the

    center pane to the right).l. In the Pattern box, type: *m. Click Add Conditions (to view this properly you may have to scroll the center pane

    to the right).n. Click Add , and then type the following Condition:o. Condition input: {HTTP_HOST}p. Type: Matches the patternq. Pattern: *r. Click OK s. In the Action Type menu, select Rewrite .t. In the Rewrite URL box, type http:/ /{C:1}/{R:0} .u. Click Apply in the Actions pane

    Complete the followingtask on:

    DC3. Adding a Live

    Smooth StreamingPublishing Point

    Note: In the following steps you will configure your origin server. In your contentdelivery network, this server will act as a content/streaming server.

    a. Log on to the DCvirtual machine.b. On the Start menu, click Internet Information Services (IIS) Manager .c. In the NYC-DC-01 left pane, expand NYC-DC-01 , and then expand the Sites tree.d. Right-click Default Web Site , and then click Add Application .e. Type LiveSmooth in the Alias textbox.f. In the Physical Path , click the ellipsis button ( ) and browse to

    C:\ Inetpub\wwwroot\LiveSmooth directory. Click OK to select the folder.g. Click OK .

    h. Click LiveSmooth in the tree in the left pane.i. In the feature view window, scroll down to Media Services , and double-click Live

    Smooth Streaming Publishing Points . j. Click Add in the Actions pane on the right.k. A new Add Publishing Point dialog box will appear. Type LiveSmooth in the File

    name box. Leave the title blank.l. Type 00:10:00 in the estimated duration. This helps the Silverlight client in scaling

    its Seek bar to the length of the content.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    11/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 9 of 11

    Tasks Detailed Stepsm. Select Push in the Live source type drop-down list.n. Click OK to close the dialog box.Note: The newly created Live Smooth Publishing Point file named LiveSmooth.ismlwill now show up in the Live Smooth Streaming Publishing Points list in the Stoppedstate.

    Complete the followingtask on:

    DC4. Start Publishing

    Point

    a. Select the newly added Publishing Point from the list, and then click StartPublishing Point in the Actions pane.Note: The newly created Publishing Point is now ready to accept a live stream pushedto it from a Live Smooth Streaming encoder. The state of the Publishing Point will beStarting which signifies that this Publishing Point is waiting for a movie to be pushed.Other property items (Archive, Stream etc.) will be in Stopped state.

    Complete the followingtask on:

    DC

    5. Push a stream to theLive SmoothStreamingPublishing Point

    Note: Now you will configure the Encoder Simulator in order to convert a SmoothStreaming video (ISMV) file to a simulated Live Smooth Streaming output that can bepushed to the newly created Live Smooth Streaming Publishing Point.a. Open the command prompt. Click Start | Run , type cmd , and then press ENTER.b. On the command prompt, browse to the directory where you installed the

    encoder and sample client files, in this case, C:\ Inetpub\wwwroot\ LiveSmooth .c. Type the following command, and then press ENTER to begin encoding simulated

    Live Smooth Streaming output from the sample Smooth Streaming video (ISMV):pushencoder http://localhost/LiveSmooth/LiveSmooth.isml "Big Buck Bunny.ism"

    Note: Go back to the IIS management console and view the Publishing Point that youcreated in the previous exercise. Press F5 and you will see that all the properties ofthis Publishing Point are Started . You may have to refresh multiple times.

    Complete the followingtask on:

    WEB-026. View the Live

    Smooth Stream

    a. Switch to the WEB-02 machine.b. Start Internet Explorer and type http:/ /nyc-web-01/LiveSmooth in the address

    bar, and then press ENTER.Note: The Live Smooth Stream will open in the web browser, using the alreadyinstalled Silverlight browser plug-in for Live Smooth Streaming. This Smooth Stream isserved from the origin server.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    12/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 10 of 11

    Exercise 4Deleting Cached Content

    ScenarioARR allows the user to enter a specific/absolute URL or a partial URL with wildcard (*) to delete all contents thatmatch the pattern. This action deletes the content(s) from both the primary cache drive location(s) and thesecondary drive, if specified. The ability to delete any specific content could be of great use in large environmentswhere certain unwanted documents or files accidentally get cached.In this exercise, you will remove the cached contents from a disk on Application Request Routing .

    Tasks Detailed Steps

    Complete the followingtask on:

    WEB-011. View the cached

    content

    a. Switch to the WEB-01 machine.b. Open Internet Explorer and browse to http:/ / nyc-web-01/ images/

    confidential.jpg .

    c. This will open an image in the browser. For this scenario you will consider this

    d. Click Start | Computer and browse to directory C:\DiskCache\NYC-DC-01\ images .

    Note: You will see that the image is being cached.

    Complete the followingtask on:

    WEB-012. Delete specific

    cached objects

    a. On the Start menu, click Internet Information Services (IIS) Manager .b. Click NYC-WEB-01 .c. Double-click Application Request Routing Cache under the IIS category on the

    right side.d. In the Actions pane, click Delete Specific Cached Objects .e. In the Delete Cached Objects dialog box, type an absolute URL path to the cached

    content that you want to delete. For this example, typehttp:/ /nyc-dc-01/images/confidential.jpg , click OK , and then click OK again toconfirm.

    Complete the followingtask on:

    WEB-013. Verify the cached

    object deletion

    a. Click Start | Computer , and browse to the C:\DiskCache\NYC-DC-01\imagesfolder.

    Note: You will see that the image that was cached is no longer there. You may repeat the above steps for some other sample images as well (for example,iis-logo.jpg, windows7-microsoft.jpg). You can see how these files are cached anddeleted one by one.

    Complete the followingtask on:

    DC4. Make the object

    completelyinaccessible

    Note: Although the cached version of the image is no longer available, the file stillexists at its original place on the origin server NYC-DC-01 . The cache will fetch that fileagain and make it available to the public. To make your (confidential) object/filecompletely unavailable, you will have to delete/move/rename it at its originallocation as well.

    a. Switch to the DC machine.b. Click Start | Computer and browse to directory C:\ inetpub\wwwroot\ images \.c. Rename the image named confidential.jpg to confidential1.jpg .d. If you have only deleted the object from the cache, you may try accessing the

    image again by refreshing the page five or six times.

  • 8/13/2019 How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    13/13

    How to Use and Configure the New Functionality in IIS Application Request Routing v. 2.0

    Page 11 of 11

    Tasks Detailed Stepse. After you have refreshed the page a couple of times, the image will be cached

    again, and you can verify this by browsing the cache directory C:\DiskCache .However, you performed the last three steps to be sure that your file does notget cached again, which would make it completely inaccessible.

    Note: If you try to access the image again after performing the last three steps, youwill receive a 404 not found error. Switch to the WEB-01 machine, and then refresh orbrowse to the http://nyc-web-01/ images/confidential.jpg page in Internet Explorer