Forum: NGINX nginx1.4.7 ip_hash load balancing strategy

680e0312b037cbb53d0a5f0d1d4c71f9?d=identicon&s=25 gaoping@richinfo.cn (Guest)
on 2014-05-16 09:30
(Received via mailing list)
Attachment: nginx__.png (5 KB)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
8744753ffc61206e1057cfe88232e014?d=identicon&s=25 Shafreeck Sea (Guest)
on 2014-05-16 10:15
(Received via mailing list)
Attachment: nginx__.png (5 KB)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-05-16 13:23
(Received via mailing list)
Hello!

On Fri, May 16, 2014 at 03:29:31PM +0800, gaoping@richinfo.cn wrote:

> hi
> When my nginx is below this structure,Nginx access to the IP
> proxy server by IP, then nginx ip_hash load balancing, will all
> requests are routed to the same tomcat, do not know if you have
> what good method to solve the.
> The ip_hash function can be introduced into a custom IP.
> Prerequisite: can not change the existing structure, and nginx
> access to the IP is only aproxy server, and IP client request is
> not true,

As long as upstream{} blocks on both frontends are identical, and
client IP stays the same, the same upstream server will be
selected by ip_hash.

--
Maxim Dounin
http://nginx.org/
680e0312b037cbb53d0a5f0d1d4c71f9?d=identicon&s=25 gaoping@richinfo.cn (Guest)
on 2014-05-17 03:21
(Received via mailing list)
Attachment: nginx___05-16-16-15-19_.png (5 KB)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
8744753ffc61206e1057cfe88232e014?d=identicon&s=25 Shafreeck Sea (Guest)
on 2014-05-17 06:00
(Received via mailing list)
Attachment: nginx___05-16-16-15-19_.png (5 KB)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
7a7c51366e39603df74feef200a3a1c1?d=identicon&s=25 Aleksandar Lazic (Guest)
on 2014-05-17 06:13
(Received via mailing list)
Maybe you could use the sticky function

http://nginx.org/en/docs/http/ngx_http_upstream_mo...

"This directive is available as part of our commercial subscription" [2]


cheers Aleks

Am 16-05-2014 10:17, schrieb gaoping@richinfo.cn:

>
>
> gaoping@richinfo.cn
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx [1]

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx [1]



Links:
680e0312b037cbb53d0a5f0d1d4c71f9?d=identicon&s=25 gaoping@richinfo.cn (Guest)
on 2014-05-19 19:47
(Received via mailing list)
Thanks for your reply, Shafreeck Sea  Provides solutions that is just
what I need.



gaoping@richinfo.cn

From: Maxim Dounin
Date: 2014-05-16 19:22
To: nginx
Subject: Re: nginx1.4.7 ip_hash load balancing strategy
Hello!

On Fri, May 16, 2014 at 03:29:31PM +0800, gaoping@richinfo.cn wrote:

> hi
> When my nginx is below this structure,Nginx access to the IP
> proxy server by IP, then nginx ip_hash load balancing, will all
> requests are routed to the same tomcat, do not know if you have
> what good method to solve the.
> The ip_hash function can be introduced into a custom IP.
> Prerequisite: can not change the existing structure, and nginx
> access to the IP is only aproxy server, and IP client request is
> not true,

As long as upstream{} blocks on both frontends are identical, and
client IP stays the same, the same upstream server will be
selected by ip_hash.

--
Maxim Dounin
http://nginx.org/
680e0312b037cbb53d0a5f0d1d4c71f9?d=identicon&s=25 gaoping@richinfo.cn (Guest)
on 2014-05-19 19:48
(Received via mailing list)
sorry, Aleksandar Lazic  Provides solutions that is just what I need.



gaoping@richinfo.cn

From: Maxim Dounin
Date: 2014-05-16 19:22
To: nginx
Subject: Re: nginx1.4.7 ip_hash load balancing strategy
Hello!

On Fri, May 16, 2014 at 03:29:31PM +0800, gaoping@richinfo.cn wrote:

> hi
> When my nginx is below this structure,Nginx access to the IP
> proxy server by IP, then nginx ip_hash load balancing, will all
> requests are routed to the same tomcat, do not know if you have
> what good method to solve the.
> The ip_hash function can be introduced into a custom IP.
> Prerequisite: can not change the existing structure, and nginx
> access to the IP is only aproxy server, and IP client request is
> not true,

As long as upstream{} blocks on both frontends are identical, and
client IP stays the same, the same upstream server will be
selected by ip_hash.

--
Maxim Dounin
http://nginx.org/
680e0312b037cbb53d0a5f0d1d4c71f9?d=identicon&s=25 gaoping@richinfo.cn (Guest)
on 2014-05-19 19:51
(Received via mailing list)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.