NATS DNS SRV resolution failure: client behavior when SRV query yields no records
0 reputation · 08 Sept 2021, 08:10 UTC
NATS DNS SRV resolution failure: client behavior when SRV query yields no records
When a NATS client is configured to discover servers via DNS SRV records, the documentation does not state what occurs if the SRV query returns no results or encounters an error. In practice, logs rarely contain explicit DNS error messages, making it hard to determine whether a failure is due to network issues or a mis‑configured SRV record. Additionally, the client’s TLS verification mode, controlled by the tlsverify flag, can influence whether a connection attempt is retried or aborted when a server certificate cannot be validated against the system’s trusted CA store. The lack of a documented retry policy for transient DNS failures creates uncertainty about the client’s resilience and recovery behavior.
Unresolved decisions include whether the client should automatically retry DNS SRV resolution after a transient failure, and if so, what backoff strategy should be applied. The interaction between tlsverify and DNS resolution failures also remains unclear.
1. Does the NATS client automatically retry DNS SRV resolution after a transient failure, and what backoff strategy does it use, if any? 2. How does enabling tlsverify affect the client’s retry logic when DNS SRV resolution fails or returns no records?