Tuesday, May 16, 2023

CST311 Week 3

The third week of CST 311 focused on the transport layer and its two protocols – UDP and TCP.

UDP is the “unreliable” transport layer protocol. When UDP segments are sent over a network, there is no guarantee that they will reach their destination. Additionally, there is no guarantee that UDP segments will arrive in the order in which they were sent. UDP’s primary advantage over TCP is its simplicity. There is less overhead when sending data over UDP when compared to TCP, and UDP forgoes TCP’s implementation of congestion control. These factors make UDP an attractive option for real-time applications, as the lightweight UDP protocol can provide greater throughput than TCP, and is not subject to self-throttling due to congestion control.

TCP is the “reliable” transport layer protocol. TCP is a connection-based protocol, where both end systems must acknowledge a connection for it to be established. Once a TCP connection is established, TCP provides a duplexed byte-stream abstraction between the client and the server. Unlike UDP, TCP gives strong guarantees regarding data delivery and delivery order. When an application sends data through a TCP connection, such as a file, it can be confident that, barring a major network failure, the file will reach the destination intact. TCP employs many complex mechanisms to provide its reliable service. An incomplete list of such mechanisms include: A three-way handshake to establish connections, sequence numbers, acknowledgement numbers, retransmissions and retransmit timers, congestion control, and more.