Welcome! Log In Create A New Profile

Advanced

Adding Hit/Miss header to proxied requests

All files from this thread

File Name File Size   Posted by Date  
smime.p7s 5.7 KB open | download Dave Barton 08/25/2011 Read message
smime.p7s 5.7 KB open | download Dave Barton 08/26/2011 Read message
Dave Barton
August 25, 2011 10:58AM
Hi,

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
Server: nginx
Date: Thu, 25 Aug 2011 13:49:34 GMT
Content-Type: application/octet-stream
Connection: keep-alive
Keep-Alive: timeout=1
Content-Length: 104857600
Last-Modified: Fri, 02 Oct 2009 15:24:44 GMT
**X-CCACDN-Mirror-ID: fsedcgdown1**
**X-CCACDN-Proxy-ID: fsedcgdp1((
Accept-Ranges: bytes
Length: 104857600 (100M) [application/octet-stream]
Saving to: “/dev/null”

Cheers
--
Dave Barton
Senior Infrastructure Architect
Comodo CA Ltd

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - smime.p7s (5.7 KB)
Subject Author Posted

Adding Hit/Miss header to proxied requests Attachments

Dave Barton August 25, 2011 10:58AM

Re: Adding Hit/Miss header to proxied requests

Maxim Dounin August 25, 2011 11:16AM

Re: Adding Hit/Miss header to proxied requests Attachments

Dave Barton August 26, 2011 04:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready