Hung Nguyen hungnv at
Wed May 18 06:07:35 UTC 2016


I do not not think nginx has this feature, but we can do it with lua module, at it’s exactly what I did, you can find it here:

It works with help of following awesome module by agentzh: lua-nginx-module and lua-updstream-module 


From:  nginx-devel <nginx-devel-bounces at> on behalf of 洪志道 <hongzhidao at>
Reply-To:  <nginx-devel at>
Date:  Wednesday, May 18, 2016 at 12:35 PM
To:  <nginx-devel at>
Subject:  upstream/302


Is there a way to get selected peer in upstream without sending request to backend server?

upstream backend {
    hash $url consistent;
    server; # Assume this is selected

location /302 {
   proxy_pass  http://backend;
   # need other config or develop custom module?

> curl -v

Just get selected server, and immediately return for 302 location.
Is it possible to support the feature, or give me advices, thanks so much.
_______________________________________________ nginx-devel mailing list nginx-devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list