Re: [squid-users] Squid as reverse proxy to thousands of domains - multiple FQDN objects cached for essentially same object

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 22 Dec 2011 23:29:11 +1300

On 22/12/2011 10:48 p.m., Kevin Jackson wrote:
> Hi,
> We operate a reverse proxy cache for thousands of domains and this
> works quite well.
> The problem we have is that our cache has to be very big (too big for
> memory) so we rely on some disk cache to serve alot of this.
>
> Our cache objects are like:
>
> www.somdomain1.com/common/some.css
> www.anotherdomain1.com/common/some.css
>
> where some.css is the same file - but Squid sees these separately and
> caches them separately causing our cache to fill up inefficiently.
>
> Is it possible with Squid to cache this common object once. It isn't
> feasible to have common elements served from a single domain (i.e.
> www.somedomain1.com/ can't pull in content from
> www.our-common-cache.com/common/some.css)
>
> What I'd like to be able to do is tell Squid these are common objects
> and therefore when it sees these, serve from a "fake" domain
> internally to it so it is transparent to the backend web servers, yet
> other elements are served as normal.
>
> Is this possible? The net effect would be thousands of separate
> objects being cached once allowing us to serve our cache from memory
> again.

You need the storeurl_rewrite feature. So far only available in Squid-2.7.
http://www.squid-cache.org/Doc/config/storeurl_rewrite_program

Amos
Received on Thu Dec 22 2011 - 10:29:18 MST

This archive was generated by hypermail 2.2.0 : Thu Dec 22 2011 - 12:00:03 MST