Welcome! Log In Create A New Profile

Advanced

load balancing with nginx using ip_hash;

February 04, 2010 10:32AM
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.
Subject Author Posted

load balancing with nginx using ip_hash;

vicky007 February 04, 2010 10:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 43
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready