Upstream and address resolution

Hi.

On a server using Nginx 0.5.x I have noted that, when one of the
upstream servers changed the IP address, the old address was still used.

I have restarted Nginx and solved the problem, but I’m not sure to
understand what happened.

Thanks Manlio P.

Hello!

On Sun, Jul 20, 2008 at 06:51:14PM +0200, Manlio P. wrote:

On a server using Nginx 0.5.x I have noted that, when one of the
upstream servers changed the IP address, the old address was still used.

I have restarted Nginx and solved the problem, but I’m not sure to
understand what happened.

Nginx does name resolution only at startup/reconfiguration (unless
you use variables in proxy_pass, as introduced in 0.6.18, but it’s
very special case).

I’m not sure if it’s documented somewhere, but it’s how it works
since creation. I don’t think this will be ever changed - since
you generally don’t want to stress your DNS subsystem (and depend
on it) under high load. Just don’t forget kill -HUP when you
change ip’s.

Maxim D.