Normal Proxy
- Some clients, infinite servers
Reverse proxy
- Infinite clients, some servers
Transparent Cache
- Might be cheating
- Might ease admin burden, like at a school
- Makes browser->proxy authentication impossible
Squid can go all these ways, at the same time.
Using a cache, it looks like you have one busy client. Anyone limiting by IP will be wrong. This does not break cookies.
What can you cache
Anything except
rfc2616.
Note private, no-cache, age, no-store, private
Heirarchy
- Can cache a cache
- Normally upper caches should be bigger
- There is ICP and HTCP to coordinate caching
HTCP is better
http://etutorials.org/Server+Administration/Squid.+The+definitive+guide/Chapter+10.+Talking+to+Other+Squids/10.8+Hypertext+Caching+Protocol/
HTCP sends full headers, so fewer cache misses
Getting from sibling/parent is a 'near miss'
Squid Software
Install with apt-get install squid
Simple test: telnet localhost 3128
Debug with Firefox, browse with chrome
Can check with find /var/spool/squid -type f
Note permissions on /var/spool/squid
Note type of files with file /var/spool/squid/*/*/*
Weird on my.nmu.edu
Logs at /var/log/squid. These are private!
Configure conf file at /etc/squid/squid.conf
faq.
Ubuntu is version 2.7. By 3.1, default is RAM only caching. Use cache_dir to fix.
To see hits, turn off browser caching!!!!! Then tail -f /var/log/squid/access.log
Compare www.google.com, www.google.com/chrome, cs.nmu.edu
Things to do:
Set up squid. It should cache for localhost
It should also cache for any computer on the local subnets.
It should provide stats using the cgi program.
It should not cache www.digg.com.
It should have a peer cache.
It works with Dans guardian.
IPTables blocks access to port 80 not through the cache.