Adding Hit/Miss header to proxied requests
dave.barton at comodo.com
Thu Aug 25 14:56:34 UTC 2011
We're using a pretty simple setup of ipvsadm balancing between 6 nginx
caching-proxies with 3 nginx backend servers configured.
When the request hits the proxy, I add a header to show which proxy
serviced the request. Similarly the backend servers add a header to
their response to show which one served the traffic.
Because we're anycasting the service at three locations, this
information is very useful for troubleshooting!
Anyway, what I want to do now is add a header to show whether a response
was served from cache or from the backend. Having been through the
documentation I'm not currently able to see how this could be done.
Anyone able to offer any advice?
h6edcgdp6:~ # nginx -v
nginx: nginx version: nginx/1.1.0
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Thu, 25 Aug 2011 13:49:34 GMT
Last-Modified: Fri, 02 Oct 2009 15:24:44 GMT
Length: 104857600 (100M) [application/octet-stream]
Saving to: “/dev/null”
Senior Infrastructure Architect
Comodo CA Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5860 bytes
Desc: S/MIME Cryptographic Signature
More information about the nginx