[
https://issues.apache.org/jira/browse/HADOOP-6607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988170#action_12988170
]
Steve Loughran commented on HADOOP-6607:
----------------------------------------
Reviewing this, I've had problems last year with bulk IO and these filters. If
something is serving up a few GB of data you don't want that response cached
just so you can add something to a filter.
1. the filter must not be applied to the entire path, only those pages where
the data volumes are small and the content expires.
2. For anything that serves up lots of data, better for the servlet to set the
expiry headers and then serve up the data.
> Proxies can cache some of the Hadoop servlet/JSP pages
> ------------------------------------------------------
>
> Key: HADOOP-6607
> URL: https://issues.apache.org/jira/browse/HADOOP-6607
> Project: Hadoop Common
> Issue Type: Bug
> Components: io
> Affects Versions: 0.22.0
> Reporter: Steve Loughran
> Priority: Minor
> Attachments: NoCachingFilter.java
>
>
> I'm suffering from proxy servers that are caching some of the HttpResponses
> that Hadoop generates in servlets/JSP pages. While the web ui is up to date,
> some of my build files are failing to pull stuff down because that is going
> via proxy -it sees an error page rather than the data
> # Every servlet should set a short expires header and disable caching,
> especially in proxies.
> # JSP pages should do it to
> # It's essential that error responses do it.
> Maybe this could be done in a filter. Otherwise something like
> {code}
> /**
> * Turn off caching and say that the response expires now
> * @param response the response
> */
> protected void disableCaching(HttpServletResponse response) {
> response.addDateHeader("Expires", System.currentTimeMillis());
> response.addHeader("Cache-Control", "no-cache");
> response.addHeader("Pragma", "no-cache");
> }
> {code}
> Before anyone rushes to do this, we should consult some HTTP experts in
> Yahoo! or Facebook to get the options right. It may be best to have, say, a
> 1s lifespan on everything.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.