Interview Q&A / Computer Networks

BeginnerQuick answer1 min readUpdated 3 Oct 2026

Can UDP datagrams arrive out of order, duplicated, or not at all?

SHORT ANSWER

Yes to all three. UDP makes no promises about order, duplicates, or delivery. Each datagram is independent and can take a different route, so the application must tolerate or handle these cases.

Explain it simply

Throwing five tennis balls over a wall one after another. Some may land out of order, one may get stuck in a tree, and a ball could bounce back and be picked up twice. UDP does not catch them for you.

Example

text
Sender sends datagrams:   A  B  C  D
Receiver may see:         A  C  B  D      (reordered)
                          A  B  D         (C lost)
                          A  B  B  C  D   (B duplicated)

Datagram boundaries are preserved, however. If the sender sends one 200-byte datagram, the receiver gets one 200-byte datagram, never two 100-byte halves or two merged. That differs from TCP, which is a byte stream with no message boundaries.

Real-time apps handle this by tagging data with sequence numbers or timestamps (RTP does this for voice and video), keeping a short jitter buffer to reorder, and dropping anything too late to play.

What to say in the interview

"UDP gives no ordering, no duplicate suppression and no delivery guarantee, but it does keep message boundaries. Applications deal with this using sequence numbers, timestamps and jitter buffers."

Common mistakes

  • Assuming local networks never reorder or drop UDP. They do under load.

#udp#datagram#reliability

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.