pdns icon indicating copy to clipboard operation
pdns copied to clipboard

rec: for the NOD lookup, ponder a "fire and forget" mode

Open omoerbeek opened this issue 3 years ago • 3 comments

NOD lookups ignore the result, so it does not make sense to wait for it: waiting wastes resources in rec. Suggested by @paddg

omoerbeek avatar May 19 '21 06:05 omoerbeek

I thought about this and it does seem doable, but a bit more complex than you might think:

  1. 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.
  2. In theory it is possible (nut unlikely) that intermediate queries are the same as the qname/qtype requested byu the client.
  3. Likely the call chain from doResolveNoQNameMinimization to doResolveAt should get a flag to indicate we're not interested in the result. This flag is then passed to doResolveAtThisIP and asyncresolveWrapper and then maybe placed in the ResolveContext so that lwres.cc can use it but the signature of asyncresolve 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.

omoerbeek avatar Oct 11 '21 12:10 omoerbeek

Okay, thanks for the update!

paddg avatar Oct 11 '21 13:10 paddg

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.

omoerbeek avatar Nov 08 '21 08:11 omoerbeek

#12047 implements s dnstap signalling for NOD/NDR events.

omoerbeek avatar Oct 03 '22 09:10 omoerbeek

Thank you!

paddg avatar Oct 03 '22 09:10 paddg