Skip to main content

What happens when a UDP packet is lost?

When a UDP packet is lost, nothing "special" happens - it is simply lost. UDP does not try to detect the loss and does not recover the data.

In short: the packet is gone, and UDP moves on as if nothing happened.


What exactly happens, step by step

  1. The sender sends a UDP packet
  2. On the network, the packet can:
  • get lost
  • be dropped due to congestion
  • get corrupted
  1. The receiver does not get the packet
  2. UDP does nothing about it:
  • no ACK
  • no timeouts
  • no retransmission

That is all.


What does NOT happen when a UDP packet is lost

Important for the interview. UDP does not:

  • retransmit
  • notify the sender
  • restore the order
  • compensate for the loss

UDP works on a best effort basis.


Who is responsible for the consequences of the loss

If data loss is critical, it has to be handled by:

Application logic

The application can:

  • resend the data
  • ignore the loss
  • interpolate the data
  • request an updated state

UDP deliberately shifts responsibility to the application.


Why this is considered normal

For many scenarios:

  • losing one packet is not critical
  • delay is worse than loss

Examples:

  • voice → a small "dropout"
  • video → a dropped frame
  • a game → a missed position update

Retransmission would be worse than the loss.


Comparison with TCP

  • TCP:
    • detects loss
    • retransmits data
    • slows down transmission
  • UDP:
    • does not detect loss
    • does not retransmit
    • works as fast as possible

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.