Skip to content

Explain why an application that needs reliable, ordered delivery might choose Transmission Control Protocol (TCP), while a real-time application that can tolerate some loss might choose User Datagram Protocol (UDP). Include the trade-offs of each.

Answer

TCP creates a session and supports sequence information, acknowledgements, and retransmission of missing data, making it suitable when reliable delivery and correct ordering matter. These mechanisms require a larger header and session state on end devices, and that state can be targeted by attackers who create many fake sessions. UDP has a smaller, simpler header and no explicit session creation, delivery confirmation, or reliability mechanisms, making it suitable for some real-time applications that can tolerate loss. The trade-off is that UDP does not itself recover missing or out-of-order data.

Explanation

### Why this is right A complete answer connects an application's needs to the protocol's delivery behavior. TCP supplies reliability mechanisms at a cost in header size and maintained state, while UDP reduces that overhead by leaving delivery best-effort. ### The concept TCP uses a session so communicating devices can confirm receipt and request missing data again. Sequence information helps the receiver put data back into order if it arrives out of sequence. These features support applications such as file transfers, email, and remote desktop. They also require a larger header and device resources to track active sessions; the refresher notes that attackers can exploit this state by creating many fake sessions. UDP does not explicitly create a session or provide confirmation and retransmission. Its simpler header suits some real-time voice and video uses, where waiting for old data could be less useful than continuing with newer data. ### What a good answer covers - TCP supports reliable delivery using a session, sequence information, and retransmission. - TCP reliability has overhead, including a larger header and state maintained by end devices. - UDP has a smaller, simpler header and provides best-effort delivery. - Application requirements determine whether reliability or lower transport overhead is preferable. ### Terms - **TCP**: Transmission Control Protocol. A transport protocol that supports reliable delivery. - **UDP**: User Datagram Protocol. A transport protocol that provides best-effort delivery. - **Session**: A tracked communication relationship between devices. - **Sequence information**: Values used to identify data order and help arrange received data. - **Acknowledgement**: A message confirming receipt of data. - **Retransmission**: Sending missing data again. - **Header**: Control information attached to data. - **Best-effort delivery**: Delivery without a transport-level guarantee of confirmation or recovery. ### Remember Choose TCP when recovery and ordering matter; consider UDP when the application can tolerate loss and benefits from simpler transport.

Related Questions

Want to practice more questions like this?

Join myBenkio free and practice past questions for your Nigerian university courses with AI explanations for every answer.

Start Practicing Free