Endpoint discovery: a successful update is still a delayed view
Distinguish DNS, endpoint discovery, resource acceptance, readiness, and the time at which a proxy actually changes forwarding.
On this page
The question for today
What you’ll understand
- Identify discovery delays between an endpoint change and proxy behavior.
- Distinguish a resource ACK from a fleet-wide routing or application-health guarantee.
- Compare strict DNS, logical DNS, and endpoint-list discovery without assuming identical connection handling.
A proxy routes using the endpoint view it has accepted, not the instantaneous truth of every workload in the cluster. Endpoint removal, readiness changes, configuration generation, network delivery, and connection reuse occur on separate timelines. Discovery engineering makes that delay observable and defines safe behavior when the view is old, incomplete, or unavailable.
Names, services, and endpoint lists are different objects
DNS can return a virtual service address, several workload addresses, or an external load balancer, depending on the deployment. A proxy receiving one virtual address may not learn the individual backends hidden behind it. Envoy v1.40.0 also supports Endpoint Discovery Service, where a management server supplies explicit endpoints and associated metadata. Those mechanisms answer related questions through different state and update paths. Determine which component resolves the name, which chooses a concrete endpoint, and whether the application or proxy caches the result.
Envoy's strict DNS mode treats resolved addresses as an explicit host set, while logical DNS uses DNS results to establish connections without treating every result change as a complete replacement of active upstreams. Their connection-draining behavior therefore differs. A DNS TTL alone is not a universal bound on how long an existing connection can reach a backend: resolver refresh policy, failed lookups, connection reuse, and discovery mode matter. Pin the mode and version before proposing a TTL change as a fix for stale routing.
Acceptance is not global agreement
An xDS client can acknowledge an accepted response or reject a response that fails validation. Resource versions and nonces help distinguish configuration state from a particular response exchange. Acceptance by one proxy does not prove that every proxy has received the same resources, that a new upstream is reachable, or that the application is serving the intended data. Related listeners, routes, clusters, endpoints, and secrets have dependencies and warming behavior. Inspect the actual resource types and their accepted versus pending state rather than treating one green connection indicator as complete synchronization.
Readiness, active health checking, passive failure observations, and discovery membership provide different evidence. A Kubernetes readiness change can influence advertised endpoints after propagation; it does not immediately close every already-established stream. An active probe exercises its configured path, which may be less demanding than real requests. A discovered address can also be unreachable from one zone but reachable from another. Explain which layer excludes an endpoint and which existing connections remain usable before concluding that an old discovery view must always fail or always remain safe.
Measure the change's visible consequence
For a controlled endpoint rollout, record when membership changed, when each proxy accepted the relevant configuration, and when requests stopped using the old destination. Separate new connection selection from existing-stream continuation. A failed update can leave previously accepted configuration active, while TTL-bearing resources or process restarts introduce additional lifetimes. Test removal, addition, empty results, rejected configuration, and a disconnected management stream. A safe test environment can reveal which stale-state behavior the chosen implementation actually provides without extrapolating one mode's behavior to every mesh.
The Markov lab is a deliberately separate stale-view analogy. Reset, set p=0.10 and q=0.40, predict stale probabilities 0.10 after one transition and 0.15 after two, then Step twice. Each Step advances one transition. Its stationary stale probability is 0.20. Separately Reset, set p=0.40 and q=0.10, predict stationary stale probability 0.80, then Play or Step. These exact matrix probabilities are not sampled network events or a model of xDS resource dependencies. Use them to ask how refresh opportunity competes with change rate, then return to measured propagation evidence.
Work it through
Trace one removal through the pipeline
In a fictional endpoint removal, detection takes 0.2 s, generation 0.1 s, delivery 0.3 s, and activation 0.4 s. A separate established stream is permitted to continue another five seconds after activation.
The serial update duration is 0.2+0.1+0.3+0.4=1.0 s before the proxy's new-selection state changes.
Under the stated stream policy, the last possible use of that established stream can be 1.0+5=6.0 s after the initial change. One-second configuration propagation does not imply all traffic ends at one second.
If the management channel is partitioned, these fixed timings no longer establish a bound. Record accepted resource state, connection behavior, and the policy determining what existing traffic may continue.
The example separates a one-second configuration change from a six-second possible traffic tail. Neither value is a universal discovery-mode default.
The living notebook
Explore the model
Interactive lab · markov
A simple competition between change and refresh
Reset, set p=0.10 and q=0.40, predict P(stale)=0.10 then 0.15 after the first two transitions, and Step twice. Separately Reset, set p=0.40 and q=0.10, predict stationary P(stale)=0.80, then Play or Step. This exact two-state chain is not an endpoint-discovery or xDS simulator.
- P(state 1) at step 0
- 0%
- Stationary P(state 1)
- 60%
- Chain behavior
- Monotone convergence
Exact finite-step probabilities for a two-state chain starting in state 0, not sampled trajectories. Playback advances two transitions per second. When p = q = 0 every distribution is stationary; when p = q = 1 the chain alternates forever. A single zero transition creates an absorbing state. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA useful stale-state model states its transition assumptions; real convergence needs resource and traffic observations.
Pause & reason
Check your understanding
Your turn
Try it yourself
A measured update has 50 ms detection, 20 ms generation, 80 ms delivery, and 30 ms activation. Find the serial propagation duration and name a condition that invalidates treating it as a worst-case guarantee.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Add the measured stages, then distinguish a successful trace from all permitted executions.
Compare with the solution
The trace totals 180 ms. A network partition, management-server outage, rejected resource, lost reconnect, or activation dependency can exceed that successful-path value. Existing streams can also continue after activation according to their separate protocol and draining rules.
Keep the idea
Take it with you
- Discovery mechanisms expose different endpoint and connection semantics.
- An ACK is local configuration evidence rather than fleet-wide readiness.
- Measure accepted state and actual new versus existing traffic separately.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.