dns: add dns_min_refresh_rate to DnsCluster#45548
Open
fl0Lec wants to merge 1 commit into
Open
Conversation
61fe85f to
bf1edf8
Compare
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>
0bea0a8 to
b6b8652
Compare
Contributor
Author
|
/retest |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
dns: add dns_min_refresh_rate to DnsCluster
Add a
dns_min_refresh_ratefield (field 10) to theDnsClusterextension proto. Whenrespect_dns_ttlis 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_rateand uses the same>= 1svalidation constraint. The floor is applied in all three DNS cluster implementations:StrictDnsClusterImpl,LogicalDnsCluster, andDnsClusterImpl(the unified impl behind theenable_new_dns_implementationruntime flag).Risk Level:
Low
Testing:
Added
TtlAsDnsRefreshRateWithMinRefreshRatetests to bothStrictDnsClusterImplParamTest(inupstream_impl_test.cc) andLogicalDnsImplementationsTest(inlogical_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 whenrespect_dns_ttl: trueand the field is explicitly configured.