Interview Q&A / Computer Networks

BeginnerQuick answer1 min readUpdated 3 Oct 2026

When would you choose UDP over TCP? Give real examples.

SHORT ANSWER

Choose UDP when speed and low delay matter more than perfect delivery, or when the app wants its own control: live video calls, online games, DNS lookups, and streaming. Old data is useless in real time, so waiting for a retransmission is worse than skipping it.

Explain it simply

On a live cricket commentary call, if one word is lost you would rather hear the next word than have the whole call pause until the missing word is resent. TCP would pause. UDP lets the stream continue.

Example

text
Use case          Why UDP fits
Google Meet call  stale audio is worthless; skip it
Online game       latest position matters, not old positions
DNS query         one small question, one small answer
Live broadcast    same stream to many viewers (multicast)
QUIC / HTTP/3     builds its own reliability on top of UDP

TCP guarantees order and delivery but pays for it with a handshake, retransmissions and head-of-line blocking. UDP adds almost nothing on top of IP: no connection, no ordering, no retransmission. If an app needs some of those, it builds them itself, choosing only what it needs.

File downloads, web pages, UPI payments and email need every byte exactly right, so they use TCP.

What to say in the interview

"UDP is connectionless and unreliable but low-overhead and low-latency. I would pick it for real-time media, games, DNS and as a base for QUIC. If correctness of every byte matters, such as payments or file transfer, TCP is the right default."

Common mistakes

  • Saying UDP is always faster. It has less overhead, but it can lose data and flood a network without congestion control.

#udp#tcp#transport

Related questions

Practise more Computer Networks questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Computer Networks quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.