Why does DNS use UDP and not TCP? - GeeksforGeeks (2024)

Last Updated : 13 Apr, 2023

Summarize

Comments

Improve

DNS is an application layer protocol. All application layer protocols use one of the two transport layer protocols, UDP and TCP. TCP is reliable and UDP is not reliable. DNS is supposed to be reliable, but it uses UDP, why?


There are the following interesting facts about TCP and UDP on the transport layer that justify the above.
1) UDP is much faster. TCP is slow as it requires a 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.
2) DNS requests are generally very small and fit well within UDP segments.
3) UDP is not reliable, but reliability can be added to the application layer. An application can use UDP and can be reliable by using a timeout and resend at the application layer.

Actually, DNS primarily uses the User Datagram Protocol (UDP) on port number 53 to serve requests. DNS queries consist of a single UDP request from the client followed by a single UDP reply from the server. When the length of the answer exceeds 512 bytes and both client and server support EDNS, larger UDP packets are used. Otherwise, the query is sent again using the Transmission Control Protocol (TCP). TCP is also used for tasks such as zone transfers. Some resolver implementations use TCP for all queries.

Another reason DNS uses UDP is because it is a connectionless protocol, meaning that it does not establish a dedicated end-to-end connection before sending data. This makes it more suitable for DNS queries, which are often short and require quick responses. In contrast, TCP is a connection-oriented protocol, meaning it requires a more complex process to establish a connection before data can be transmitted.

Additionally, because DNS is a widely used protocol, there is a significant amount of traffic that needs to be handled by DNS servers. UDP is more scalable and efficient than TCP for handling large amounts of traffic, as it does not require the overhead of connection management.

https://en.wikipedia.org/wiki/Domain_Name_System#DNS_protocol_transport



Why does DNS use UDP and not TCP? - GeeksforGeeks (2)

GeeksforGeeks

Why does DNS use UDP and not TCP? - GeeksforGeeks (3)

Improve

Please Login to comment...

Why does DNS use UDP and not TCP? - GeeksforGeeks (2024)
Top Articles
These ultraprocessed foods may shorten your life, study says
Telling someone that they're dying | Information for professionals
How To Fix Epson Printer Error Code 0x9e
Craigslist Houses For Rent In Denver Colorado
Fredatmcd.read.inkling.com
Midflorida Overnight Payoff Address
T Mobile Rival Crossword Clue
Usborne Links
25X11X10 Atv Tires Tractor Supply
Pj Ferry Schedule
Devourer Of Gods Resprite
Slmd Skincare Appointment
Scholarships | New Mexico State University
The Murdoch succession drama kicks off this week. Here's everything you need to know
finaint.com
Bad Moms 123Movies
Uc Santa Cruz Events
Walmart stores in 6 states no longer provide single-use bags at checkout: Which states are next?
Jbf Wichita Falls
Race Karts For Sale Near Me
Fort Mccoy Fire Map
Doki The Banker
Jayah And Kimora Phone Number
Strange World Showtimes Near Savoy 16
Cognitive Science Cornell
Blackboard Login Pjc
Restored Republic
Craigslist Auburn Al
Greyson Alexander Thorn
Angel del Villar Net Worth | Wife
Mark Ronchetti Daughters
Diggy Battlefield Of Gods
Napa Autocare Locator
Memberweb Bw
Oreillys Federal And Evans
What Are Digital Kitchens & How Can They Work for Foodservice
Powerspec G512
The Complete Guide To The Infamous "imskirby Incident"
Baywatch 2017 123Movies
Pawn Shop Open Now
Tirage Rapid Georgia
Search All of Craigslist: A Comprehensive Guide - First Republic Craigslist
Sofia With An F Mugshot
Port Huron Newspaper
Wpne Tv Schedule
Best Restaurant In Glendale Az
Chitterlings (Chitlins)
Hcs Smartfind
Unbiased Thrive Cat Food Review In 2024 - Cats.com
Unity Webgl Extreme Race
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 5856

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.