two nginx with ip_hash as a load balancer

Weibin Yao nbubingo at
Thu Jul 2 14:34:43 MSD 2009

kaktos at 2009-7-2 18:12 wrote:
> Hi,
> I have build a new application behind our hardware load balancer, since we need the 'sticky session' feather that our LB couldn't offer.So I put two nginx as a soft LB behind the hardware LB(that round-robin to nginx). Then I found the two nginx
> always hash the same client IP to different backend server. it's weird if I understood right about the ip_hash that using crc32 hashing the IP address and % the number of server nodes to get the target backend server. So why I got two different backend server? any help?
You can try my developing module for session sticky: And you need a 
careful test before using this module in your product environment.

Questions/patches can be directed to me, hope this will help you.

Weibin Yao

More information about the nginx mailing list