proxy_store help requested
mdounin at mdounin.ru
Mon Mar 10 23:06:58 UTC 2014
On Sun, Mar 09, 2014 at 10:34:08PM -0400, nginx_newbie_too wrote:
> The 304 response from the upstream server ended up being the culprit. If I
> changed the upstream server to have 'if_modified_since off;" and thus always
> respond with a 200 and the content, the problem is resolved. To freshen the
> mirror, I can then simply remove the mirrored content from the downstream
> server; no nginx processes even need to be restarted.
So the actual problem was incorrect testing, not a
misconfiguration. And yes, proxy_store only stores 200 responses
and nothing more, so anything else won't be stored, including 304.
This is generally good enough, as 304 doesn't contain response
body and hence doesn't imply much traffic.
> Maxim, this may be obvious to you, but it wasn't to me, and no documentation
> pointed me in this direction. As a suggestion, a small note about the
> significance of setting i-m-s off on upstream servers in such mirroring
> situations in the documentation about proxy_store would be helpful.
1) This is not something I would recommend to do, at least not
something to be done in general.
2) Note that proxy_store is something very basic. It can be used
to do powerful things, but if you are looking for something "ready
to use out of the box" - consider using proxy_cache instead.
More information about the nginx