Performance Vision is now a part of Accedian

Learn More »
>>DNS series #2 : Recursive vs Iterative DNS query

DNS series #2 : Recursive vs Iterative DNS query

By |2018-08-09T11:48:44+00:00July 11th, 2017|Categories: Performance Troubleshooting|

This is the second article in a series of DNS troubleshooting articles that cover some important aspects of the DNS protocol that are worth knowing when troubleshooting application performance issues.

For various reasons (size of database, performance, redundancy, security), when trying to translate an FQDN (Fully Qualified Domain Name) into an IP address, a single DNS server cannot answer all requests by itself. To do that on his own, it would have to store all FQDNs defined worldwide and be able to handle all requests!

The Name Space Architecture

To handle this challenge, the DNS resolution process will use an architecture called the “Name Space”. To resolve any FQDN, the “Name Space” is based on a tree structure like the example shown hereunder:

dns troubleshooting

In this tree structure, each zone is managed by Authoritative Name Servers that contain the mappings between domain names and related IP addresses in the zone itself as well as pointers to subsequent zones.

How the Iterative DNS resolution works

Apart from the information that is available in its local cache, the DNS client trying to convert the FQDN (e.g. into an IP address will take the following steps:

  1. The DNS client (the PC on which the web browser is installed) will first contact the “.” Root Name Server (called “Root Hints”);
  2. This Name Server will then send the IP address of the “.com” Name Server(s) to the client;
  3. The client then contacts the next Name Server in the chain, up until the Name Server that contains the full FQDN is found and reached. This process is summarized in the following figure.

This process is called an “iterative” process as the client makes all needed requests up to the final FQDN resolution.

How recursive DNS resolution works

In practice though, when looking for the IP address of the FQDN “”, the client will generally contact its local DNS server (configured in its IP stack) to ask for the IP address corresponding to “”.

The client asks the local DNS server to perform all needed requests on its behalf. This is called a « recursive » DNS query.

How to distinguish Iterative and Recursive DNS queries

The client undertakes a recursive request by flagging a particular bit in the flag section of the DNS query “Recursion desired: Do query recursively”, as shown in the Wireshark trace hereunder.

In its response, the Name Server will confirm (or not) that it supports the recursive DNS query behavior by setting the flag “Recursion available: Server can do recursive queries” to 1 (to 0).

Discover 4 easy steps to diagnose performance degradation

About the Author:

Thierry Notermans
Thierry Notermans is the founder and Managing Director of Majutec, which specializes in delivering ICT and management consultancy services to help customers develop and manage their IT-driven business and organization. (LinkedIn profile)