Re: mod_perl output filter and mod_proxy, mod_cache

André Warnier <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
And here is another link which might be interesting.
It is a message on the Tomcat list (where I re-posted your original request, hem), from
Rainer Jung, who is one of the Apache/Tomcat mod_jk connector developers :

"
Yes, go for TC 7:

http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Expires_Filter

Regards,

Rainer
"

Now that Tomcat page, apart from its own interest, also points to the Apache "mod_expires" 
module (which I never heard about before) in your case may be exactly what you're looking for.

It seems to be such that it can add headers in a response proxied to Tomcat, without 
overwriting such headers if they already exist.


Here is what I would do :

1) identify some "usual suspects" among the URLs proxied to Tomcat
    They would have to match the following criteria :
    - they happen on an overloaded Tomcat
    - they happen often
    - I am reasonably sure that the information delivered by that URL
      is stable over a period of time
    - I am reasonably sure that if it happened that the browser would,
      once in a while, get stale information, it would not be dramatic

2) carefully configure the front-end Apache to, for these particular URLs,
add an Expires header specifying "now + N", where N is initially not too large.
This way, a browser would not get a result that is more than N outdated, but any duplicate 
request within a period N would get the cached version.

3) look at the impact and loop or not, increasing or decreasing N

YMMV.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.