proxy_set_header variable evaluation
Arvind Jayaprakash
work at anomalizer.net
Tue Sep 1 21:05:28 MSD 2009
On Aug 27, Maxim Dounin wrote:
>Hello!
>The only thing that *is* lost is knowledge of already tried
>upstream servers for this request. And if you use same upstream
>blocks for both normal proxy and fallback - you have a chance to
>visit same upstream server again if it's not yet marked as failed
>(max_fails isn't yet reached).
>
>On the other hand, with this aproach you have limited number of
>tries for each request. This is proved to be better thing for
>large pools of upstream servers.
>
>> Is the proxy module the right place to start hacking if I want to create
>> a new version of set_header where the variable gets evaluated for each
>> time a new upstream is selected for a new request?
>
>You have to recreate request somewhere near
>ngx_http_upstream_next(). I don't think that this is a good thing
>to do though.
Let me try and state my original problem: What is the easiest way to let
the upstream know that it is answering a "retry" and not an original
request?
More information about the nginx
mailing list