Welcome! Log In Create A New Profile

Advanced

Re: nginx DNS doesn't update the upstream IP

Maxim Dounin
April 14, 2021 04:20PM
Hello!

On Wed, Apr 14, 2021 at 01:19:08PM -0400, kay wrote:

> Here is an example of the proxy_pass config, we don't use IP's
>
> proxy_pass https://example.com;
>
> When "example.com" changes the IP address, it is not reflected in nginx.
> We're using k8s pods. Sometime one or two pods have stale DNS cache. Other
> pods work fine...

That's exactly how it is expected to work: names in the
configuration are resolved during configuration parsing. If you
want to re-resolve names, you have to reload the configuration.

Alternatively, you can configure proxy_pass using variables. As
documented in http://nginx.org/r/proxy_pass:

: Parameter value can contain variables. In this case, if an
: address is specified as a domain name, the name is searched among
: the described server groups, and, if not found, is determined
: using a resolver.

Hope this helps.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx DNS doesn't update the upstream IP

kay April 14, 2021 12:48PM

Re: nginx DNS doesn't update the upstream IP

Sergey A. Osokin April 14, 2021 12:56PM

Re: nginx DNS doesn't update the upstream IP

Grzegorz Kulewski April 14, 2021 12:56PM

Re: nginx DNS doesn't update the upstream IP

kay April 14, 2021 01:19PM

Re: nginx DNS doesn't update the upstream IP

kay April 14, 2021 01:26PM

Re: nginx DNS doesn't update the upstream IP

Maxim Dounin April 14, 2021 04:20PM

Re: nginx DNS doesn't update the upstream IP

kay April 16, 2021 07:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready