You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Rakesh G K <rg...@gmail.com> on 2014/01/07 09:55:43 UTC

Problem with Clustered mode caching

Hi all,
I have a 2-node ATS cluster configured as reverse proxies.The cluster is up
(verified through cluster.config entries), and I face a situation with
regard to caching. For simplicity's sake, lets call the 2 nodes as ats1 and
ats2.
I have a Tomcat server which hosts a web service. The ATS cluster is
configured as a reverse proxy for this. When I send a request thro ats1,
the response is fetched from the origin server, and it is cached on one of
these 2 nodes (verified thro cache inspector). Now, if I send the same
query thro ats2, it doesnt fetch it from the cache, but goes to server.
The http.proxy is enabled. The cluster is in full-cluster mode. Both the
machines are connected to the same switch and share the same ethernet port
(default eth0, no dedicated port). Both have same ATS version, same OS and
distribution, almost same hardware (both have i3 but the models are
different), and both have the same architecture.
The remap.config file contains the following entry (analogous, cannot share
actual content owing to company policies).

    map http://{ats1_ip}:4444/small http://{ip}:8080/smallResponse
    map http://{ats1_ip}:4444/medium http://{ip}:8080/mediumResponse
    map http://{ats1_ip}:4444/large http://{ip}:8080/largeResponse

    map http://{ats2_ip}:4444/small http://{ip}:8080/smallResponse
    map http://{ats2_ip}:4444/medium http://{ip}:8080/mediumResponse
    map http://{ats2_ip}:4444/large http://{ip}:8080/largeResponse

    map http://{ats1_ip}:4444/cache http://{cache}
    map http://{ats2_ip}:4444/cache http://{cache}


The tomcat serves the following services (again, analogous):

`{ip}:8080/smallResponse` - returns a very small string of size <10KB

`{ip}:8080/mediumResponse` - returns a string of size ~ 250KB

`{ip}:8080/largeResponse` - return a very large string of size > 5MB

I am not running ATS on port 80 since I've not installed it as a root
application, and port:80 is not permitted on non root applications.

Question: Why does ats2 go to the origin server when the content for that
particular request is already present in the cache?.

Has anyone faced similar problem or does anyone have any suggestions as to
what might be wrong or where I have to start looking?

Thanks,
Rakesh