ICP version 2 in DeleGate was realized in the version 5.5 released on June 14, 1998. Now HTTP-DeleGate (DeleGate for HTTP clients) can utilize ICP to select the nearest parent/sibling cache for each requested resource. Also DeleGate can work as an independent ICP server on a hierarchical file directory where each file contains a resource identified by a URL.
To refer ICP servers from your HTTP-DeleGate server, specify those servers in "ICP=icp-host-list" parameter:
delegated -P8080 SERVER=http ICP=icp-host1,icp-host2To make DeleGate work as an ICP server, specify "SERVER=icp" parameter with a CACHEDIR parameter pointing to the location of a (cache) directory:
delegated -P3130 SERVER=icp CACHEDIR=/path/of/cacheTo make a couple of proxy ICP-DeleGate and HTTP-DeleGate on a firewall:
delegated -P3130 SERVER=icp ICP=icp-host1,icp-host2 delegated -P8080 SERVER=http ICP=icp-host1,icp-host2Note that you cannot make DeleGate work as both ICP-DeleGate and HTTP-DeleGate by a single server process.
ICP Client Configuration
To figure about more advanced usage of ICP-DeleGate, it will be helpful to compare it with the "reference" implementation of ICP, Squid. In Squid, ICP configuration is specified by `cache_host' directive of the following format [RFC2187].
cache_host hostname type http-port icp-port [options]For example, two neighbor caches can be referred as follows:
cache_host host1 parent 8080 3130 cache_host host2 sibling 80 3130This example is realized in DeleGate with a ICP parameter as:
ICP=host1/p/8080/3130,host2/s/80/3130 or with its abbreviated respresentation: ICP=host1/p,host2//80The format of ICP parameter is as follows:
"ICP=" icp-servers icp-servers = icp-server [ "," icp-server ]* icp-server = host "/" server-type "/" http-port "/" icp-port server-type = [ "p" | "s" | "l" ] [ "o" ] [ "n" ] [ "H" | "D" | "O" ]Server type "p", "s" and "l" specifies tye type of ICP server: "p" means "parent" cache to which a HTTP request is forwarded when the ICP response is HIT or MISS, "s" means "sibling" to which HTTP request is forwarded only when the ICP response is "HIT" (default), and "l" means "listener" to which no HTTP request will be forwarded; it is a lisetn only ICP server to make logging, prefetching, robot control, and so on. Server type "o" means to require HIT_OBJ response to the ICP server.
The complete format of ICP parameter is as follows:
"ICP=" icp-servers [ ":" icp-ext ] icp-ext = [ icp-opt ] ":" [ http-port ] ":" [ icp-port ] [ ":" conn-map ] conn-map = dst-protocols ":" dst-hosts ":" src-hostsWith conn-map, you can select icp-servers based on who is requesting what: the protocol and the destination server of requested URL, and requesting source client. See Manual.txt for more detail.
ICP Server Configuration
An ICP server by DeleGate (ICP-DeleGate) runs independently of HTTP proxies and other proxies or origin servers which serve contents of URLs exchanged in ICP. The behaviour of an ICP-DeleGate server can be controlled by a ICPCONF parameter.
"ICPCONF=" conf-list conf-list = conf [ "," conf ]* conf = "para:" number // the number of parallel server processes  | "hitage:" age // oldest age of cache to be notified as HIT [1d] | "hitobjage:" age // oldest age of cache to be returned in HIT_OBJ [1h] | "hitobjsize:" size // max. size of data to be returned in HIT_OBJ Access control of ICP-DeleGate is achived by PERMIT parameters which is commonly used in all protocols relayable by DeleGate.
PERMIT = dst-protocols : dst-hosts : src-hostsIf a client's request is not permitted, ICP_OP_DENIED will be returned to the client.
ICP-DeleGate must be given a CACHEDIR parameter pointing to the location of cache file directory. Each (cache) file contains a resource identified by a URL and has a file name as follows:
URL: protocol://site/url-path file: $CACHEDIR/protocol/site/url-pathOf course this is a cache directory structure of DeleGate, and you don't need to concern about it. Normally you will run a ICP-DeleGate server with HTTP-DeleGate servers, with the common CACHEDIR parameter.
[Last updated: June 14, 1998]