[Date Index]
[Thread Index]

[Date Prev] bullet [Date Next] bullet [Thread Prev] bullet [Thread Next]
bullet
Re: cache on town hall
bullet bullet bullet bullet

bburdick@media.org writes:


>>
>> Could you add this (or similar) to /etc/inittab?
>>
>> sq:3:respawn:/usr/local/harvest/Squid/bin/squid.sh < /dev/null >> /tmp/squid.log 2>&1
>>
>
>done. you want a kill -1 init to start it up now? did you mean to leave the
>TZ info in PDT?

Ok, go ahead and HUP init.

We have all the caches run with TZ=PDT just to keep things sort of consistent.


>btw, does the harvest/squid cache do much with redirection of http requests?
>can it? i'm still thinking about a front-end to port 80 on our park servers
>that does the automagic redirection based upon incoming/src domain.

The cache doesn't do anything with redirects yet--it just passes them on.

A few months ago I hacked up NCSA httpd-1.5 to read in a config file based on the AS database return an appropriate redirect message. I sent this message to Carl (I think):

First cut at IP-based redirections. The patch below is against NCSA httpd 1.5a.

On startup, httpd looks for a file named in $AS_TABLE. The format of this file is

#IP addr IP Mask redirect-host # 127.0.0.1 255.255.255.255 jp.park.org 198.5.254.0 255.255.255.0 uk.park.org 10.0.0.0 255.0.0.0 au.park.org

For simplicity the mask is specified now in dotted-decimal. This could be changed to something like

198.5.254.0/24

The envrionment variable $THIS_HOST should be set to the host's name or alias used in the 'redirect-host' column. So if the IP address/mask matches, and the redirect-host is equal to $THIS_HOST, then we don't give the redirect, we just process the request normally.

The function which checks IP addresses currently uses a simple linked list. It will be too slow if the AS table has 40k entries. I'll rewrite the function to use hashes, or something else.

Duane W.

bullet
[Date Prev] bullet [Date Next] bullet [Thread Prev] bullet [Thread Next]
bullet