Welcome! Log In Create A New Profile

Advanced

Re: ip_hash clarification

Ryan Malayter
February 25, 2010 02:06PM
On Thu, Feb 25, 2010 at 11:40 AM, J M <jerome.m@gmail.com> wrote:
> Hi,
>
>    i need details regarding ip_hash...
>
>   if i have client IP1: 192.168.1.1 and client IP2: 192.168.1.2
>
> and I have 2 servers on the upstream.. s1 and s1.. with IP_Hash configured
>
>
> if client IP1 accesses the site it will go to lets say S1 would it actually
> mean that the next request coming from a new client IP Client2.. will it go
> to s2?
>

I believe ip_hash uses only the "Class C" part of the address. This is
so people with firewalls that have them "hop" IP addressess still get
directed to the same back-end. So since both clients are coming from
192.168.1.XXX, nginx will direct them to the same back-end server.

I was actually considering a patch to make this configurable a few
moths ago, but we decided to go with session replication on our
back-ends instead, so I stopped looking into it.

For testing, you could put a client on 192.168.2.XXX to see the
desired behavior.

--
RPM

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

ip_hash clarification

J M February 25, 2010 12:50PM

Re: ip_hash clarification

Ryan Malayter February 25, 2010 02:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
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