Jump to content

Internet Cache Protocol

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 46.117.153.229 (talk) at 17:45, 9 October 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Internet Cache Protocol (ICP) is a protocol used for coordinating web caches. Its purpose is to find out the most appropriate location to retrieve a requested object from in the situation where multiple caches are in use at a single site. The goal is to use the caches most efficiently, and to minimize the number of remote requests to the originating server.

Hierarchically, a queried cache can either be a parent or a sibling.

Parents usually sit closer to the internet connection than the child. If a child cache cannot find an object, the query usually will be sent to the parent cache, which will fetch, cache, and pass on the request. Siblings are caches of equal hierarchical status, whose purpose is to distribute the load amongst the siblings.

When a request comes into one cache in a cluster of siblings, ICP is used for querying the siblings for the object being requested. When the sibling has got the object, it would usually be transferred there from, instead of being queried from the original server. This is often called a "near miss"—the object is not found in the cache (a “miss”) yet it is loaded from a nearby cache, instead of from a remote server.

The ICP protocol was designed to be lightweight in order to minimize round-trip time between caches. It is intended for unreliable but quick connections.

The ICP protocol is described in RFC 2186, its application to hierarchical web caching in RFC 2187.

Web proxies that support ICP include:

HTCP, designed as a successor to ICP, attempts to handle various problems found in ICP deployments.

ICP message structure

An ICP message consists of two sections:

  • Header
  • Data

Header: Header length is fixed to 20 octets (five 32-bit words).

Data: Data is of variable length, limited by the maximum ICP message size (including header) of 16,384 octets.

The ICP header consists of 8 fields, with 2 optional fields. The fifth and sixth field is optional (pink background in table) and appropriately named “options” and “option data”.

ICP Header
Bit offset Bits 0–7 8–15 16-31
0 Opcode Version Message Length
32 Request number
64 Options
96 Option Data
128 Sender Host Addresss
160+  
Data
 

References

  • RFC 2186 ICP version 2
  • RFC 2187 Application of ICP version 2