is there a way to force a specific ip address to always go to the same server in upstream?

Momchil Ivanov slogster at gmail.com
Wed Sep 16 02:30:06 MSD 2009


На Tuesday 15 September 2009 08:04:57 Igor Sysoev написа:
> http {
>      map  $remote_addr  $back {
>           default    backend;
>           127.0.0.1  127.0.0.1:8003;
>      }
>
>      upstream backend {
>          server 127.0.0.1:8001;
>          server 127.0.0.1:8002;
>          server 127.0.0.1:8003;
>      }
>
>      server {
>         listen 8080;
>  	server_name localhost;
>
>          location / {
>              proxy_pass http://$back$request_uri;

Are you having any plans on implementing the same stuff for fastcgi_pass? May 
I pass a variable for the backend name to fastcgi_pass: fastcgi_pass 
$backend_name? I would like to be able to choose different fastcgi upstreams 
on some conditions (as the above one for example).

Thanks,
Momchil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://nginx.org/pipermail/nginx/attachments/20090916/1932cf9a/attachment.pgp>


More information about the nginx mailing list