What is UDP?

A connectionless protocol that sends data without guaranteeing delivery or order.

Detailed Explanation

UDP is a lightweight protocol that sends packets (datagrams) without establishing a connection or confirming receipt. This makes it faster than TCP but less reliable. It's ideal for applications where speed is more important than perfect accuracy, or where the application handles its own reliability, such as real-time video, gaming, or DNS queries.

Examples

  • DNS queries typically use UDP for speed
  • Video streaming and VoIP prefer UDP for real-time performance
  • Online gaming uses UDP to minimize latency