Reliable transport service: the communicating processes can rely on TCP to deliver all
data
sent without error and in the proper order.
When one side of the application passes a
stream
of bytes into a socket, it can count on TCP to deliver the same
stream of bytes to the
receiving socket, with no missing or duplicate bytes. TCP also includes a congestion-control
mechanism which throttles a sending process when the network is congested between sender
and receiver. The throttling of the transmission rate can have very harmful effect on real-
time audio and video applications that have a minimum required bandwidth constraint.
Real-time applications are loss-tolerant and does not need a fully reliable transport service.
Developers of real-time applications usually run their applications over UDP rather than
TCP.
Some of the services that TCP does not provide: it does not guarantee a minimum
transmission rate, a sending process is not permitted to transmit at any rate it wishes, the
sending rate is regulated by TCP congestion control, or it may force the sender to send at a
low average rate. TCP does not provide any delay guarantees. When a sending passes data
into a TCP socket, the data will eventually arrive at the receiving process, but TCP
guarantees absolutely no limit on how long the data may take to get there. TCP guarantees
delivery of all data, but provides no guarantees on the rate of delivery or on the delays
experienced.
UDP does not include a congestion control mechanism, so a sending process can pump data
into a UDP socket at any rate it pleases. Because real-time applications usually can tolerate
some loss but require a minimal rate, developers of real-time applications often choose to
run their applications over UDP, thereby circumventing TCP's congestion control and
packet overheads. Similar to TCP, UDP provides no guarantee on delay.
E-mail, remote terminal access, the Web, and file transfer all us TCP. These applications
have chosen TCP because TCP provides a reliable data transfer service, guaranteeing that
all data will eventually get to its destination. Internet telephony typically runs over UDP. Each side of an Internet phone application needs to send data across the network at some
minimum rate; this is more likely to be possible with UDP than TCP. Internet phone applications are loss-tolerant, so they do not need the reliable data transfer service
provided by TCP. Today's Internet can often provide satisfactory service to time-sensitive
applications, but it cannot provide any timing or bandwidth guarantees.