What are the limitations of ip_hash ?

Dave Cheney dave at cheney.net
Wed Dec 31 06:56:26 MSK 2008

Hi Mark,

Can you explain 'not working'. From my experience with ip_hash given a
large enough set of incoming IP addresses, requests would be distributed
equally across both machines. Its not so much a hash as a modulo of the
incoming ip address.



On Tue, 30 Dec 2008 22:15:21 -0500, Mark Swanson <mark at ScheduleWorld.com>
> upstream tomcatcluster {
>         ip_hash;
>         server test1:8080 max_fails=0;
>         server test2:8080 max_fails=0;
>     }
> It seems that the size of ip_hash is too small and it can't hold enough
> keys - or perhaps nginx clears out keys after a period of time?
> I'm curious what the limitations of ip_hash are because it's not working
> 100% of the time.
> Thank you.

More information about the nginx mailing list