3

I'm running Nginx as a reverse proxy as a container in my Docker Swarm. I know at startup it caches all the aliases for my proxy_pass locations. When running a service in Docker Swarm, the service is assigned a VIP and the swarm will direct traffic to that VIP to one of the backend containers. My assumption is that Nginx should cache the VIP for my service and as long as I only run docker service update commands the VIP will not change (even though the backend IPs may change).

However is this not the behavior I am seeing. Whenever I run docker service update the VIP does not change however my proxy starts sending Bad Gateway responses. If I then --force the proxy service to update it usually starts working again. I would like to verify what IP(s) Nginx is caching but I can't find documentation on where this cache resides.

FYI: I have experimented with resolver which does work but that just means my site is down until the TTL expires (which I know I can set low but I shouldn't have to).

Brett Mathe
  • 181
  • 5

0 Answers0