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 ... |