Introduction
-
Transmission Control Protocol (TCP): This is a communication protocol used in sending data packets between devices on a network in an orderly and dependable manner. In order to guarantee that data is transferred over the network and arrives intact and in the right order, it operates at the transport layer of the TCP/IP model and offers capabilities like error checking, flow control, and congestion control [1].
-
User Datagram Protocol (UDP): This is another communication protocol that also functions at the TCP/IP model transport layer. Unlike TCP, UDP does not guarantee the orderly or dependable delivery of data packets. Rather, UDP focuses on offering a quick and light communication mechanism. It transmits datagrams—packets of data—without making a connection or ensuring delivery acknowledgment. It is commonly used on platforms where timeliness is necessary, such as live video stream, gaming etc [2].
Objective
The purpose of this project is to understand network protocols, specifically, TCP and UDP. Latency will be measured by calculating the time it takes to send an 8 byte, 64 byte and 512 byte message using both protocols, while throughput will be measured by calculating the bits per second it takes to send a 1mb message. Three sample message size (in bytes) will be sent continuously until they add up to 1mb. For a more detailed description of this project, click here or the logo at the top right.
Results
-
Round Trip Time (RTT)/ Latency: As the name implies, this is the total time (in milliseconds) it takes for a sender (source) to send a packet to a destination (receiver) and then receive an acknowledgement from that destination.
-
Throughput: This is the amount of data that is being sent per unit time. It is measured in bits per second (bps). For the sake of a readable graph, Megabits per second (Mbps) will be used as the unit.
Observation
Apart from the fact that some machine pairs perform better than others, sending multiple messages using UDP produces a better throughput than sending the same set of messages using TCP.
References
-
Transmission Control Protocol (TCP) (article) | Khan Academy. (n.d.). Khan Academy. https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:the-internet/xcae6f4a7ff015e7d:transporting-packets/a/transmission-control-protocol--tcp
-
Rosencrance, L., Lawton, G., & Moozakis, C. (2023, December 6). User Datagram Protocol (UDP). Networking. https://www.techtarget.com/searchnetworking/definition/UDP-User-Datagram-Protocol