Decoding the Web: TCP, UDP, Sockets, and Congestion Control in Computer Networks
by Yuvi K - December 16, 2023
Decoding the Web: TCP, UDP, Sockets, and Congestion Control in Computer Networks
The web has come a long way since its humble beginnings. Nowadays we can stream high quality movies, browse social media, and connect with our friends located all over the world. But it’s easy to take for granted all the technical wizardry that’s required to make this happen. In this article, we’re going to dive into the world of computer networking to explore some of the core concepts.
We’ll be exploring concepts such as TCP (Transmission Control Protocol), UDP (User Datagram Protocol), sockets, and congestion control.
What are Sockets?
Simply put, a socket is the combination of an IP address and a port number. Each device connected to a computer network has a unique IP address, and the port number helps identify a specific service on the device. Sockets are the foundation for the data transmission that allows us to browse the web, and they are used to make connections between two devices on the same network.
It’s like a door where data knocks for access. The socket ensures that the door is open when needed and tells the data where it needs to go.
UDP
UDP (User Datagram Protocol) is a core part of computer networking. It is a connectionless protocol, meaning that it doesn’t establish a connection between two devices before sending data.
This is useful for applications like streaming audio and video, where you want to send data quickly and without any lag. The downside is that the data is sent without any error checking, so there is a risk of data corruption or packet loss.
TCP
On the other hand, TCP (Transmission Control Protocol) is a connection-oriented protocol. It establishes a connection between two devices, referred to as a socket, and verifies that the data is sent and received correctly at both ends.
In addition, it turns the data into chunks called packets, so it can be sent and received more quickly. The downside of TCP is that it takes more time to establish the connection and data transfer is slower than with UDP.
Congestion Control
Congestion control is a technique used by networks to optimize network performance. It works by limiting the amount of data that can be sent at any given time so that it doesn’t overwhelm the network. It’s like a traffic cop that makes sure data doesn’t get stuck in a traffic jam.
Conclusion
Computer networks are complex and understanding the different protocols and techniques can be overwhelming. But in this article we’ve hopefully demystified some of the fundamentals, such as sockets, UDP, TCP, and congestion control. Knowing these concepts will give you a better understanding of how the web works, and the power of connection and data transmission.