You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Moshe Kaplan <mo...@gmail.com> on 2011/11/27 21:52:34 UTC

Caching mismatch with two different sites on the same origin server

Hi,

We tried to implement ATS as a reverse proxy to two different sites that
are hosted on the same origin server (www.a.com and www.b.com)
The origin URL for both sites is the same (http://10.10.10.1/index.htm and
http://10.10.10.1/index.htm) and the only difference in the requests is the
Host header.

We receive always only one copy of the sites (either www.a.com or www.b.com
).

When we used a direct GET to the sites, w/o the ATS, everything worked well.
When we disabled the cache (CONFIG proxy.config.http.cache.http INT 0),
everything started to behave normally.

Therefore, we assumed that it is a case that ATS caches the files according
to the IP address and avoid the Host header (unlike Apache httpd for
example).

When we enabled the cache  (CONFIG proxy.config.http.cache.http INT 1) and
added varying by HTTP host field (CONFIG
proxy.config.http.cache.vary_default_text STRING Host CONFIG
proxy.config.http.cache.vary_default_images STRING Host CONFIG
proxy.config.http.cache.vary_default_other STRING Host) it did not help.

Anyone familiar with a solution to this case issue?

Thanks,
Moshe

Re: Caching mismatch with two different sites on the same origin server

Posted by Leif Hedstrom <zw...@apache.org>.
On 11/27/11 1:52 PM, Moshe Kaplan wrote:
> Hi,
>
> We tried to implement ATS as a reverse proxy to two different sites that
> are hosted on the same origin server (www.a.com <http://www.a.com> and
> www.b.com <http://www.b.com>)
> The origin URL for both sites is the same (http://10.10.10.1/index.htm and
> http://10.10.10.1/index.htm) and the only difference in the requests is
> the Host header.

That's as expected, the default cache key is the rewritten (remapped) URL.

-- leif