upstream/302

洪志道 hongzhidao at gmail.com
Wed May 18 05:35:50 UTC 2016


Hi

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

upstream backend {
    hash $url consistent;
    server  192.168.1.101;
    server  192.168.1.102; # Assume this is selected
    server  192.168.1.103;
}


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


> curl http://test.com/302 -v
...
Location: http://192.168.1.102/xxx
...

Just get selected server, and immediately return for 302 location.
Is it possible to support the feature, or give me advices, thanks so much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160518/15a451d2/attachment.html>


More information about the nginx-devel mailing list