pdns
pdns copied to clipboard
rec: for the NOD lookup, ponder a "fire and forget" mode
NOD lookups ignore the result, so it does not make sense to wait for it: waiting wastes resources in rec. Suggested by @paddg
I thought about this and it does seem doable, but a bit more complex than you might think:
- Only the latest query for the qname/qtype as requested by the client should be fire & forget; all other queries should be waited for because their results (NS etc) are needed to do the final query.
- In theory it is possible (nut unlikely) that intermediate queries are the same as the qname/qtype requested byu the client.
- Likely the call chain from
doResolveNoQNameMinimization
todoResolveAt
should get a flag to indicate we're not interested in the result. This flag is then passed todoResolveAtThisIP
andasyncresolveWrapper
and then maybe placed in theResolveContext
so thatlwres.cc
can use it but the signature ofasyncresolve
does not change.
Now I actually have to write this code to see if this plan works. Don't know yet if this is going to make 4.6.
Okay, thanks for the update!
After some experiments and discussion in #10849 the conclusion is: faf can be done with a dnsdist helper and we would like to have a way to signal NOD event using protobuf and/or dnstap. protobuf client/answer message already carry the NOD info, but the ability to only send out messages on NOD events is useful.
#12047 implements s dnstap signalling for NOD/NDR events.
Thank you!