Friday, March 12, 2010

More on how recursion is done

Recursion will be done in Deadwood as follows:
  • We look for a record in the cache with the same name and type as the stub resolver requested.
  • If not found, we will look for a CNAME referral with the same name as what the stub resolver requested
  • If not found, we will look for a NS referral with the same name as what the stub resolver requested
  • If not found, we will lop names off of the front of what they requested as a NS referral until we find something in the cache
When we find a CNAME referral, we change the name of what we request to be the final name in the CNAME referral, note that we had this CNAME referral, and continue processing.

When we find a NS referral, we use a NS server at random. If the server is glueless, we will have to find out the IP address of the NS server before proceeding. To hand glueless records, we note the list of NS records as the current step in the recursive process, look up the glueless record, and then continue as before.

I will discuss how to store this entire process in a future blog entry.