Why DNS uses UDP as the transport layer protocol?

Ada S picture Ada S · Oct 15, 2016 · Viewed 15.1k times · Source

Why DNS uses UDP as the transport layer protocol?

Answer

Matthias Hamann picture Matthias Hamann · Oct 15, 2016
  • UDP is much faster. TCP is slow as it requires 3 way handshake. The load on DNS servers is also an important factor. DNS servers (since they use UDP) don’t have to keep connections.
  • DNS requests are generally very small and fit well within UDP segments.
  • UDP is not reliable, but reliability can be added on application layer. An application can use UDP and can be reliable by using timeout and resend at application layer.