Skip to content

dns: add dns_min_refresh_rate to DnsCluster#45548

Open
fl0Lec wants to merge 1 commit into
envoyproxy:mainfrom
DataDog:fl/dns-min-refresh-rate
Open

dns: add dns_min_refresh_rate to DnsCluster#45548
fl0Lec wants to merge 1 commit into
envoyproxy:mainfrom
DataDog:fl/dns-min-refresh-rate

Conversation

@fl0Lec

@fl0Lec fl0Lec commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Commit Message:
dns: add dns_min_refresh_rate to DnsCluster

Add a dns_min_refresh_rate field (field 10) to the DnsCluster extension proto. When respect_dns_ttl is enabled, DNS records with TTLs shorter than this value are refreshed at this rate instead. This prevents excessively frequent re-resolution for low-TTL records (e.g. a 1s TTL record would otherwise trigger DNS queries every second without this floor).

The field mirrors DnsCacheConfig.dns_min_refresh_rate and uses the same >= 1s validation constraint. The floor is applied in all three DNS cluster implementations: StrictDnsClusterImpl, LogicalDnsCluster, and DnsClusterImpl (the unified impl behind the enable_new_dns_implementation runtime flag).

Risk Level:
Low

Testing:
Added TtlAsDnsRefreshRateWithMinRefreshRate tests to both StrictDnsClusterImplParamTest (in upstream_impl_test.cc) and LogicalDnsImplementationsTest (in logical_dns_cluster_test.cc). Both tests are parameterized to cover the legacy and new DNS implementations. Each test verifies that TTLs below the minimum are floored, and TTLs above pass through.

Docs Changes:
Changelog entry added at changelogs/current/new_features/dns_cluster__dns_min_refresh_rate.rst.

Release Notes:
Included

API Considerations:
New optional field on DnsCluster. Defaults to unset (no-op), fully backwards-compatible. Only active when respect_dns_ttl: true and the field is explicitly configured.

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #45548 was opened by fl0Lec.

see: more, trace.

@fl0Lec fl0Lec force-pushed the fl/dns-min-refresh-rate branch from 61fe85f to bf1edf8 Compare June 10, 2026 11:01
Adds a new `dns_min_refresh_rate` field (field 10) to the `DnsCluster` extension proto.
When `respect_dns_ttl` is enabled, DNS records with TTLs shorter than this value are
refreshed at this rate instead, preventing excessively frequent re-resolution for
low-TTL records. The floor is applied in all three DNS cluster implementations:
StrictDnsClusterImpl, LogicalDnsCluster, and DnsClusterImpl (the new unified impl
behind the runtime flag).

Signed-off-by: Florent Lecoultre <florent.lecoultre@datadoghq.com>
@fl0Lec fl0Lec force-pushed the fl/dns-min-refresh-rate branch from 0bea0a8 to b6b8652 Compare June 10, 2026 12:18
@fl0Lec

fl0Lec commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@fl0Lec fl0Lec marked this pull request as ready for review June 10, 2026 13:30
@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #45548 was ready_for_review by fl0Lec.

see: more, trace.

@fl0Lec fl0Lec changed the title Add dns_min_refresh_rate to DnsCluster dns: add dns_min_refresh_rate to DnsCluster Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants