TECHNOLOGY

Envoy DNS discovery can change membership or only new connections

In this article
THE QUICK TAKE

A refreshed DNS answer does not imply the same connection-draining behavior in every Envoy cluster type.

Resolution succeeded but connections stayed

An upstream DNS answer changes after a service replacement, yet an Envoy connection continues using an older address. That can be expected under logical DNS rather than evidence of a failed resolver. Discovery type determines what the answer changes.

The service-discovery guide distinguishes STRICT_DNS and LOGICAL_DNS. Both resolve asynchronously, but strict discovery treats returned addresses as explicit hosts, while logical discovery uses an address when a new connection is initiated.

Follow strict membership changes

Under strict DNS, each returned address participates as a host. Removing an address from a successful answer removes that membership and drains associated connection pools. A successful empty answer can therefore leave the cluster without hosts.

Record the complete answer and resolution outcome, not only the first address printed by a diagnostic tool. Repeated addresses within a name are deduplicated, while separate configured names resolving to the same address have additional health-check implications documented by the guide.

Follow logical connection selection

Logical DNS maintains a logical pool whose physical connections can reach different upstream addresses. Existing connections are not drained merely because the answer changes, including the documented successful empty-answer case. New connection creation and existing connection lifetime are distinct observations.

Do not assume this supplies unlimited continued availability. The old connection can still fail, and the application may eventually need another connection. Preserve actual selected addresses and connection events instead of declaring either instant migration or permanent pinning from one sample.

Inspect refresh policy separately

The cluster API provides the configuration context for discovery and refresh settings. Effective TTL handling, refresh interval and failure refresh behavior affect when answers are observed; they do not make strict and logical membership semantics identical.

Separate a successful empty answer from resolution failure. Also distinguish the proxy’s asynchronous resolution from another program’s lookup at another time. A host-level lookup is supporting evidence, not the exact answer consumed by a particular Envoy process.

Acceptance for an address transition

In an isolated fixture, change a controlled DNS answer while keeping a long-lived connection and creating new ones. Observe membership, pool events and actual request destinations under each intended discovery type. Include a successful empty answer and a resolver failure as separate conditions.

Resolver-path diagnosis explains work before a usable answer. Connection and request draining explains why a connection transition does not by itself classify every accepted operation.

Choose semantics before calling behavior stale

Strict discovery can cause connection churn when answers rotate; logical discovery can intentionally retain connections across rotations. Neither is universally correct for every upstream. The accepted configuration should match whether DNS enumerates explicit service instances or fronts a larger logical service, with observed connection behavior consistent with that choice. A fresh answer alone cannot certify that all existing traffic moved.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles