Web Caching
| only for RuBoard - do not distribute or recompile |
C.3 Examples
The following is a fictitious CARP membership table that shows the global information section followed by the list of array members. The three array members should each appear on one line. These lines are too long to fit on the page, so they are wrapped around and indented:
Proxy Array Information/1.0 ArrayEnabled: 1 ConfigID: 12345 ArrayName: My-Array ListTTL: 3600 proxy1.isp.net 10.2.3.4 3128 http://proxy.isp.net/carp.txt SmartCache-v1 21600 UP 1 2048 proxy2.isp.net 10.2.3.5 3128 http://proxy.isp.net/carp.txt SmartCache-v1 20127 UP 1 2048 proxy3.isp.net 10.2.3.6 3128 http://proxy.isp.net/carp.txt SmartCache-v1 22928 UP 1 2048
The following tables may be useful to developers who want to verify their implementation. Table C-1 is a list of proxy names and load factors. I took the program described previously and added printf statements to print the hash values, RLF, and LFM.
Table C-1. Proxy Array Values
| Hostname | Hash Value | Load Factor | RLF | LFM |
|---|---|---|---|---|
| test1.ircache.net | 0x96010320 | 1 | 0.142857 | 0.869442 |
| test2.web-cache.com | 0x84965f0f | 1 | 0.142857 | 0.869442 |
| test3.squid-cache.org | 0x4f5d7332 | 2 | 0.285714 | 1.064844 |
| test4.packet-pushers.com | 0xa79af670 | 3 | 0.428571 | 1.242318 |
Table C-2 consists of hash values and Table C-3 shows CARP scores for five different URIs. The four scores correspond to the four proxy names given earlier. The score values are truncated (not rounded) after the decimal point to improve the readability of this table.
Table C-2. URI Hash Values
| URI | Hash Value |
|---|---|
| http://www.squid-cache.org | 0x16073a01 |
| http://www.ircache.net | 0xae0af388 |
| http://www.web-cache.com | 0xd6b2152d |
| http://www.oreilly.com | 0x31952fdd |
| ftp://ftp.microsoft.com | 0x50cc09bf |
Table C-3. URI Scores
| URI | Score 1 | Score 2 | Score 3 | Score 4 |
|---|---|---|---|---|
| http://www.squid-cache.org | 1937807807 | 737946946 | 3043043329 | 4019296969 |
| http://www.ircache.net | 1372682590 | 2237060277 | 2349863321 | 543856355 |
| http://www.web-cache.com | 2885259455 | 1656192339 | 4204309062 | 2705367480 |
| http://www.oreilly.com | 843623848 | 2648286094 | 3561199409 | 5289183760 |
| ftp://ftp.microsoft.com | 1098649645 | 993566466 | 675513163 | 2319331913 |
| only for RuBoard - do not distribute or recompile |