You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new parameter to newPacketCache to allow caching TC responses with no rdata.
Usecase
To allow caching of empty TC responses for some short amount of time and avoid sending every query to the backends.
Description
Normally, truncated responses from backends with the TC flag set, and no answers provided, do not get cached due to the lack of any record data with a TTL. This means that any recurring UDP queries miss cache and are sent to the backends (likely even to an authoritative from there) only to again respond to the client to retry over TCP.
This can generate a lot of unnecessary traffic to both backends and potentially out to authoritatives for popular queries with large answers.
I propose adding a new parameter to newPacketCache called something like truncatedNoAnswerTTL that functions much like the existing temporaryFailureTTL. It should default to 0, but can be set to a value of number of seconds for which any empty truncated responses from backends will be cached. This would allow operators to choose to have the bulk of these queries hit cache automatically, immediately returning a TC response to clients to retry over TCP. This would reduce load on backends and potentially out to other providers, without having to explicitly configure rules to do this for popular problem queries.
An example of the type of query response that would be cached in this case:
@phonedph1 yes, definitely related, but just wanted to propose a specific option to implement without getting lost in the noise of the comments there.
dmccombs
changed the title
dnsdist: Add new parameter to newPacketCache "truncatedAnswerTTL"
dnsdist: Add new parameter to newPacketCache "truncatedNoAnswerTTL"
Oct 26, 2024
Short description
Add new parameter to
newPacketCache
to allow caching TC responses with no rdata.Usecase
To allow caching of empty TC responses for some short amount of time and avoid sending every query to the backends.
Description
Normally, truncated responses from backends with the TC flag set, and no answers provided, do not get cached due to the lack of any record data with a TTL. This means that any recurring UDP queries miss cache and are sent to the backends (likely even to an authoritative from there) only to again respond to the client to retry over TCP.
This can generate a lot of unnecessary traffic to both backends and potentially out to authoritatives for popular queries with large answers.
I propose adding a new parameter to
newPacketCache
called something liketruncatedNoAnswerTTL
that functions much like the existingtemporaryFailureTTL
. It should default to 0, but can be set to a value of number of seconds for which any empty truncated responses from backends will be cached. This would allow operators to choose to have the bulk of these queries hit cache automatically, immediately returning a TC response to clients to retry over TCP. This would reduce load on backends and potentially out to other providers, without having to explicitly configure rules to do this for popular problem queries.An example of the type of query response that would be cached in this case:
The text was updated successfully, but these errors were encountered: