We have the following setup: nginx buildpack as reverse proxy with proxy_pass set to an internal route *.apps.internal. The setup works fine until the app to which the internal route leads restarts. Then we have the problem that the app gets a new internal IP address and the internal DNS does not immediately resolve the internal route *.apps.internal to the new IP address. Are we missing some settings?
A manual restart of the reverse proxy solves the problem. However, this is not a long-term solution.
Probably using Nginx
resolvercould help, from the docs:You could use it globally:
Or per location:
Problem is to know what DNS server to use, from these links:
resolver 169.254.0.2;is used, just in case, the169.254.0.0/16IPv4 range belongs to the Link-local address, so better double check what DNS server to use.