What are some applications that you use that would make a choice to use an unreliable Transport layer protocol such as UDP? Why would an application choose to be unreliable?

MMOs don't require reliability as the state of the game is constantly changing. If you required each packet to be received then the client might not have the most current information.

UDP sends and receives datagrams for applications. Unlike TCP, UDP is unreliable. There is no guarentee that the datagram will ever reach the destination. This in itself has advantages, one being that UDP can be considerably faster then TCP.

TCP, Transmission Control Protocol is a layer 4 service that is allows reliable transmission of data, that is, unlike UDP, host-A awaits for confirmination from host-B that the data that has been sent, was successfully received. It will also guarantee that packets will be received in the same order that they where sent.
TCP is more reliable then UDP, but slower.
(quoted from my website)


UDP applications:
DNS
SSH (also uses TCP though)
BOOTP
TFTP
SNMP
CISCO VQP

and a great use, STEAM FRIENDS :)

MMOs don't require reliability as the state of the game is constantly changing. If you required each packet to be received then the client might not have the most current information.

That's not entirely true, WOW uses TCP quiet heavily. EVE tends to use UDP more.

:)

If you want maximum performance, the overhead of TCP might be too much.
If you want maximum reliability, TCP alone may not be reliable enough.

UDP - more efficient
TCP - more reliable

A number of applications use UDP because of its efficiency, such as (optionally) NFS. Example, One end sends sends 100 packets, each associated with one block of a file. It will sequence them, and include a checksum. These are validated by the receiver, which only needs to tell the sender to resend those that have a bad checksum, or that are missing. This is basically what tcp does, but tcp also requires an ack of each packet whereas udp does not. As a result, on a clean connection (such as a lan with good ethernet switches), you get much better throughput with udp than tcp. For WAN applications, tcp is a much better choice in my experience. So, if an application can choose or be configured to use either UDP or TCP, then select UDP for high performance LAN applications, and TCP for WAN applications.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.