Forum: NGINX load balancing with nginx using ip_hash;

Posted by vicky007 (Guest)
on 2010-02-04 16:33
(Received via mailing list)
Hello,

I've experienced strange behavior - I have website with many subdomains 
and I have nginx set up as load balancer and proxy to apache.

each subdomain is using

proxy_pass         http://apaches;

While upstream apaches is defined as follows:

upstream apaches  {
        ip_hash;
        server 127.0.0.1:8044;
        server 10.0.0.1:8044;
}


Today I noticed that one subdomain was going to 127.0.0.1 and another 
one to 10.0.0.1. I always thought nginx calculates the ip_hash centrally 
and then it does not matter in how many virtualhosts are there, it 
always points the ip to the same upstream.

I'm using nginx/0.8.33.

Thank you.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,50505,50505#msg-50505
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.