Demystifying Computer Networks

Translation Control Protocol(TCP) and User Datagram Protocol(UDP)

TCP

This is the most common transport layer protocol by far, almost all the web's traffic runs over it including HTTP, mail traffic, etc. In TCP, communication between computers rely on a feedback mechanism. To send packets of data over a network, the sending computer establishes a connection or session with receiving computer and then waits for the receiving computer to acknowledge the session. Once the acknowledgement is received by the sending computer, it then begins to send the packets of data and for every packet of data sent, the sending computer waits to receive an acknowledgement before it sends a new packet over. If the receiving computer fails to acknowledge any packet, the sending computer assumes packet loss and then resend such packets.

UDP

In UDP, the sending computer does not establish any form of session with the receiving computer, rather, it just begins to send packets of data over. Even when a packet goes missing, it does not have the feedback mechanism to alert the sending computer, it just continues sending. The UDP has no built in mechanism that enables re-sending lost packets.