Welcome! Log In Create A New Profile

Advanced

Re: upstream+ip_hash: hash valid global?

Maxim Dounin
September 30, 2013 11:08AM
Hello!

On Mon, Sep 30, 2013 at 09:16:14AM -0400, revirii wrote:

> Hi,
>
> thanks for your answer :-)
>
> > It's an implementation detail. As of now, two identical
> > upstream{} blocks will map the same ip address to the same peer's
> > number. But it's not something guaranteed.
>
> ok, this is the behaviour when the upstreams are identical, i.e. they have
> the same backends. That would be ok for me.
>
> But what if the backends are not identical? My example was:
>
> upstream one {
> server backendA;
> server backendB;
> server backendC;
> }
>
> upstream two {
> server backendA;
> server backendD;
> server backendE;
> }
>
> If a user sends a request - > upstream:one -> backendA and then makes a
> request where upstream:two is used, is he then sent to backendA as well? Ok,
> this would be nice to know, but it's not that important ;-)

As long as all servers configured map to the same number of
peers (in most simple case - each "backendX" resolves to a single
ip address) - such backends are identical for the above sentence,
and the request will be sent to "backendA" in both cases.

But, again, this isn't something guaranteed.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

upstream+ip_hash: hash valid global?

revirii September 26, 2013 06:42AM

Re: upstream+ip_hash: hash valid global?

revirii September 30, 2013 08:11AM

Re: upstream+ip_hash: hash valid global?

Maxim Dounin September 30, 2013 08:34AM

Re: upstream+ip_hash: hash valid global?

revirii September 30, 2013 09:16AM

Re: upstream+ip_hash: hash valid global?

Maxim Dounin September 30, 2013 11:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready