Networking & HTTP·Networking from DNS to production

TCP and UDP

Know when you need reliability and when you need low latency.

Beginner 12 min read Lesson 3 of 300 Challenge included
What you will be able to do
  • TCP guarantees order and delivery.
  • UDP is used for DNS, video and QUIC.
  • Ports identify services on both protocols.
  • Connection reuse reduces handshake cost.

In plain English

TCP provides ordered, reliable delivery with congestion control, at the cost of handshakes and retransmissions. UDP is connectionless and fast, leaving reliability to the application. HTTP/3 uses QUIC over UDP.

terminalTerminal
curl -v --http1.1 https://example.com/ 2>&1 | grep -E 'Connected|Reusing|HTTP/'
curl --http3 https://example.com/ -o /dev/null -sS -w '%{http_version}\n'
Your turn

Force HTTP/1.1

Easy

Write a curl command that forces HTTP/1.1 and shows headers.

BASH · starter
curl https://example.com
Check your understanding before moving on.
Knowledge checkQuestion 1

Which protocol guarantees ordered, reliable delivery?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: HTTP basics
Lesson 3 of 300 · 0% of course