Sun Java System Web Proxy Server 4.0.3 2006Q2 Administration Guide

Using the Internet Cache Protocol (ICP)

About ICP

The Internet Cache Protocol (ICP) is an object location protocol that enables caches to communicate with one another. Caches can use ICP to send queries and replies about the existence of cached URLs and about the best locations from which to retrieve those URLs. In a typical ICP exchange, one cache will send an ICP query about a particular URL to all neighboring caches. Those caches will then send back ICP replies that indicate whether or not they contain that URL. If they do not contain the URL, they send back a “MISS.” If they do contain the URL, they send back a “HIT.”

Routing through ICP Neighborhoods

ICP can be used for communication among proxies located in different administrative domains. It allows a proxy cache in one administrative domain to communicate with a proxy cache in another administrative domain. It is effective for situations in which several proxy servers want to communicate, but cannot all be configured from one master proxy (as they are in a proxy array). Figure 12–3 shows an ICP exchange between proxies in different administrative domains.

The proxies that communicate with each other through ICP are called neighbors. You cannot have more than 64 neighbors in an ICP neighborhood. There are two types of neighbors in an ICP neighborhood, parents and siblings. Only parents can access the remote server if no other neighbors have the requested URL. Your ICP neighborhood can have no parents or it can have more than one parent. Any neighbor in an ICP neighborhood that is not a parent is considered a sibling. Siblings cannot retrieve documents from remote servers unless the sibling is marked as the default route for ICP, and ICP uses the default.

You can use polling rounds to determine the order in which neighbors receive queries. A polling round is an ICP query cycle. For each neighbor, you must assign a polling round. If you configure all neighbors to be in polling round one, then all neighbors will be queried in one cycle. In other words, they will all be queried at the same time. If you configure some of the neighbors to be in polling round 2, then all of the neighbors in polling round one will be queried first and if none of them return a “HIT,” all round two proxies will be queried. The maximum number of polling rounds is two.

Since ICP parents are likely to be network bottlenecks, you can use polling rounds to lighten their load. A common setup is to configure all siblings to be in polling round one and all parents to be in polling round two. That way, when the local proxy requests a URL, the request goes to all of the siblings in the neighborhood first. If none of the siblings have the requested URL, the request goes to the parent. If the parent does not have the URL, it will retrieve it from a remote server.

Each neighbor in an ICP neighborhood must have at least one ICP server running. If a neighbor does not have an ICP server running, it cannot answer the ICP requests from their neighbors. Enabling ICP on your proxy server starts the ICP server if it is not already running.

Figure 12–3 An ICP Exchange

Diagram showing an ICP exchange between proxies in different
administrative domains.

ProcedureTo set up ICP

Steps
  1. Add parent(s) to your ICP neighborhood.

    (This step is only necessary if you want parents in your ICP neighborhood.) For more information on adding parents to an ICP neighborhood, see Adding Parents to an ICP Neighborhood.

  2. Add sibling(s) to your ICP neighborhood.

    For more information on adding siblings to your ICP neighborhood, see Adding Siblings to an ICP Neighborhood.

  3. Configure each neighbor in the ICP neighborhood.

    For more information on configuring ICP neighbors, see Configuring Individual ICP Neighbors.

  4. Enable ICP.

    For information on enabling ICP, see Enabling ICP.

  5. If your proxy has siblings or parents in its ICP neighborhood, enable routing through an ICP neighborhood.

    For more information on enabling routing through an ICP neighborhood, see Enabling Routing Through an ICP Neighborhood.

Adding Parents to an ICP Neighborhood

ProcedureTo add parent proxies to an ICP neighborhood

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Click the Configure ICP link.

    The Configure ICP page displays.

  3. In the Parent List section of the page, click the Add button.

    The ICP Parent page displays.

  4. In the Machine Address field, enter the IP address or host name of the parent proxy you are adding to the ICP neighborhood.

  5. In the ICP Port field, enter the port number on which the parent proxy will listen for ICP messages.

  6. In the Multicast Address field, you can enter the multicast address to which the parent listens. A multicast address is an IP address to which multiple servers can listen.

    Using a multicast address allows a proxy to send one query to the network that all neighbors who are listening to that multicast address can see; therefore, eliminating the need to send a query to each neighbor separately. Using multicast is optional.


    Note –

    Neighbors in different polling rounds should not listen to the same multicast address.


  7. In the TTL field, enter the number of subnets that the multicast message will be forwarded to.

    If the TTL is set to 1, the multicast message will only be forwarded to the local subnet. If the TTL is 2, the message will go to all subnets that are one level away, and so on.


    Note –

    Multicast makes it possible for two unrelated neighbors to send ICP messages to eachother. Therefore, if you want to prevent unrelated neighbors from receiving ICP messages from the proxies in your ICP neighborhood, you should set a low TTL value in the TTL field.


  8. In the Proxy Port field, enter the port for the proxy server on the parent.

  9. From the Polling Round drop-down list, choose the polling round that you want the parent to be in. The default polling round is 1.

  10. Click OK.

  11. Click Restart Required.

    The Apply Changes page displays.

  12. Click the Restart Proxy Server button to apply the changes.

Editing Parent Configurations in an ICP Neighborhood

ProcedureTo edit the parent configuration

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Select the Configure ICP link. The Configure ICP page displays.

  3. Click the radio button next to the parent you want to edit.

  4. Click the Edit button.

  5. Modify the appropriate information.

  6. Click OK.

  7. Click Restart Required.

    The Apply Changes page displays.

  8. Click the Restart Proxy Server button to apply the changes.

Removing Parents from an ICP Neighborhood

ProcedureTo remove parent proxies from an ICP neighborhood

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Select the Configure ICP link. The Configure ICP page displays.

  3. Click the radio button next to the parent you want to remove.

  4. Click the Delete button.

  5. Click Restart Required.

    The Apply Changes page displays.

  6. Click the Restart Proxy Server button to apply the changes.

Adding Siblings to an ICP Neighborhood

ProcedureTo add sibling proxies to an ICP neighborhood

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Select the Configure ICP link.

    The Configure ICP page displays.

  3. In the Sibling List section of the page, click the Add button.

    The ICP Sibling page displays.

  4. In the Machine Address field, enter the IP address or host name of the sibling proxy you are adding to the ICP neighborhood.

  5. In the Port field, enter the port number on which the sibling proxy will listen for ICP messages.

  6. In the Multicast Address field, enter the multicast address to which the sibling listens.

    A multicast address is an IP address to which multiple servers can listen.

    Using a multicast address allows a proxy to send one query to the network that all neighbors who are listening to that multicast address can see; therefore, eliminating the need to send a query to each neighbor separately.


    Note –

    Neighbors in different polling rounds should not listen to the same multicast address.


  7. In the TTL field, enter the number of subnets that the multicast message will be forwarded to.

    If the TTL is set to 1, the multicast message will only be forwarded to the local subnet. If the TTL is 2, the message will go to all subnets that are one level away.


    Note –

    Multicast makes it possible for two unrelated neighbors to send ICP messages to eachother. Therefore, if you want to prevent unrelated neighbors from receiving ICP messages from the proxies in your ICP neighborhood, you should set a low TTL value in the TTL field.


  8. In the Proxy Port field, enter the port for the proxy server on the sibling.

  9. From the Polling Round down-down list, choose the polling round that you want the sibling to be in.

    The default polling round is 1.

  10. Click OK.

  11. Click Restart Required.

    The Apply Changes page displays.

  12. Click the Restart Proxy Server button to apply the changes.

Editing Sibling Configurations in an ICP Neighborhood

ProcedureTo edit the sibling configuration

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Select the Configure ICP link.

    The Configure ICP page displays.

  3. Click the radio button next to the sibling you want to edit.

  4. Click the Edit button.

  5. Modify the appropriate information.

  6. Click OK.

  7. Click Restart Required.

    The Apply Changes page displays.

  8. Click the Restart Proxy Server button to apply the changes.

Removing Siblings from an ICP Neighborhood

ProcedureTo remove sibling proxies from an ICP neighborhood

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Select the Configure ICP link.

    The Configure ICP page displays.

  3. Click the radio button next to the sibling you want to remove.

  4. Click the Delete button.

  5. Click Restart Required.

    The Apply Changes page displays.

  6. Click the Restart Proxy Server button to apply the changes.

Configuring Individual ICP Neighbors

You need to configure each neighbor, or local proxy, in your ICP neighborhood.

ProcedureTo configure the local proxy server in your ICP neighborhood

Steps
  1. Access the Server Manager, and click the Caching tab.

  2. Select the Configure ICP link.

    The Configure ICP page displays.

  3. In the Binding Address field, enter the IP address to which the neighbor server will bind.

  4. In the Port field, enter the port number to which the neighbor server will listen for ICP.

  5. In the Multicast Address field, enter the multicast address to which the neighbor listens.

    A multicast address is an IP address to which multiple servers can listen. Using a multicast address allows a proxy to send one query to the network that all neighbors who are listening to that multicast address can see; therefore, eliminating the need to send a query to each neighbor separately.

    If both a multicast address and bind address are specified for the neighbor, the neighbor uses the bind address to send replies and uses multicast to listen. If neither a bind address or a multicast address is specified, the operating system will decide which address to use to send the data.

  6. In the Default Route field, enter the name or IP address of the proxy to which the neighbor should route a request when none of the neighboring proxies respond with a “hit.”

    If you enter the word “origin” into this field, or if you leave it blank, the default route will be to the origin server.


    Note –

    If you choose “first responding parent” from the No Hit Behavior drop-down list , the route you enter in the Default Route field will have no effect. The proxy only uses this route if you choose the default no hit behavior.


  7. In the second Port field, enter the port number of the default route machine that you entered into the Default Route field.

  8. From theOn No Hits, Route Through drop-down list, choose the neighbor’s behavior when none of the siblings in the ICP neighborhood have the requested URL in their caches.

    You can choose:

    • first responding parent. The neighbor will retrieve the requested URL through the parent that first responds with a “miss”

    • default route. The neighbor will retrieve the requested URL through the machine specified in the Default Route field.

  9. In the Server Count field, enter the number of processes that will service ICP requests.

  10. In the Timeout field, enter the maximum amount of time the neighbor will wait for an ICP response in each round.

  11. Click OK.

  12. Click Restart Required.

    The Apply Changes page displays.

  13. Click the Restart Proxy Server button to apply the changes.

Enabling ICP

ProcedureTo enable ICP

Steps
  1. Access the Server Manager, and click the Preferences tab.

  2. Click the Configure System Preferences link.

    The Configure System Preferences page displays.

  3. Select the Yes radio button for ICP.

  4. Click OK.

  5. Click Restart Required.

    The Apply Changes page displays.

  6. Click the Restart Proxy Server button to apply the changes.

Enabling Routing Through an ICP Neighborhood

ProcedureTo enable routing through an ICP neighborhood

Steps
  1. Access the Server Manager, and click the Routing tab.

  2. Click the Set Routing Preferences link.

    The Set Routing Preferences page displays.

  3. Select the resource from the drop-down list or click the Regular Expression button, and enter a regular expression, and click OK.

  4. Select the radio button next to the text Route Through.

  5. Select the checkbox next to ICP.

  6. If you want the client to retrieve a document directly from the ICP neighbor that has the document instead of going through another neighbor to get it, select the checkbox next to the text redirect.

  7. Click OK.


    Caution – Caution –

    Redirect is not currently supported by any clients, so don’t use the feature at this time.



    Note –

    You need to enable routing through an ICP neighborhood only if your proxy has other siblings or parents in the ICP neighborhood. If your proxy is a parent to another proxy and does not have any siblings or parents of its own, then you need to enable ICP only for that proxy. You do not need to enable routing through an ICP neighborhood.


  8. Click Restart Required.

    The Apply Changes page displays.

  9. Click the Restart Proxy Server button to apply the changes.