Changing an upstream hostname does not necessarily mean every nginx worker immediately uses the new addresses. Resolver configuration, keepalive connections, DNS TTLs, reload timing, and long-lived client sessions can leave some traffic reaching an old backend after the cutover appears complete. Checking only through the load balancer may miss the worker or connection that stayed stale.
What evidence do you collect before retiring the old address? I am considering logging the selected upstream address, probing through every nginx replica, draining or expiring upstream keepalives, watching connection counts on the old backend, and keeping it fenced but observable until no new requests arrive for more than the longest relevant TTL and session lifetime.
How does your procedure differ between a static `upstream` resolved at configuration load, `resolve` with a configured resolver, and dynamic service discovery? Is a reload sufficient in practice, or do you require a connection drain or worker-generation check before removing the old backend?
Source: r/nginx · by /u/RocketSeven