Re: NGINX stale-while-revalidate cluster

2017-07-08 Thread Joan Tomàs i Buliart
Hi Peter, yes, it's true. I will try to explain our problem better. We provide a mobile solution for newspaper and media groups. With this kind of partners, it is easy to have a peak of traffic. We prefer to give stale content (1 or 2 minutes stale content, not more) instead of block the req

Re: Writing Header to Logfile

2017-07-08 Thread Liu Lantao
According to nginx document (http://nginx.org/en/docs/http/ngx_http_core_module.html#var_http_): --- $http_name arbitrary request header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscores ——— if the request header name is 'X-Cus

Re: NGINX stale-while-revalidate cluster

2017-07-08 Thread Peter Booth
Perhaps it would help if, rather than focus on the specific solution that you are wanting, you instead explained your specific problem and business context? What is driving your architecture? Is it about protecting a backend that doesn't scale or more about reducing latencies? How many differen

Re: NGINX stale-while-revalidate cluster

2017-07-08 Thread Joan Tomàs i Buliart
Thanks Owen! We considered all the options on these 2 documents but, on our environment in which is important to use stale-while-revalidate, all of them have, at least, one of these drawbacks: or it adds a layer in the fast path to the content or it can't guarantee that one request on a stale