Internet Protocols (TCP and UDP) & Network Protocol

Internet Protocols (TCP and UDP) & Network Protocol

This article is based on the protocols. In this, we understand the two main messengers of the digital world. What are they, and how do they work in the digital world? Then we understand a network protocol and why it matters in the digital world.

The Two Messengers: TCP and UDP

In the digital world, communication between different villages (computers) is essential. To ensure messages were delivered fast and reliably, two famous messengers were assigned the task: TCP and UDP.

TCP

In case of TIME ⬇️ it was not good but,

In case of RELIABILITY ⬆️ it was great.

UDP

in case of TIME ⬆️it was very fast but,

In case of RELIABILITY⬇️ it does not perform well

TCP: The Reliable Messenger

TCP (Transmission Control Protocol) was an accurate and reliable messenger.

The Motto was: “No message (packets) left behind!

How TCP functions:

  1. Form Connection:

    Before delivering a message, TCP always establishes a clear connection between the user device (browser) and the server, like setting up a private channel for communication.

  2. Confirmation:

    TCP divides messages into small packets. TCP numbered them all and ensured every packet reached its destination (address) in the correct order.

    If any packet went missing, TCP would resend it until everyone was received perfectly in the correct order.

  3. Checking:

    TCP will double-check every packet for errors, ensuring that the message was delivered accurately.

Pros of TCP

  • Reliable and double-check everything, which makes it an error-free messenger.

  • Best fit for tasks like:

    • Email

    • File transfer

    • Web browsing

Cons of TCP

  • Slower due to connection setup and acknowledgment process.

UDP: The Fast Messenger

UDP (User Datagram Protocol), on the other hand, was the digital world’s speediest messenger.

The motto was: “Fast and efficient delivery, no questions asked!

How UDP functions

  1. Connectionless service:

    UDP didn't bother setting up a connection before sending packets. He just sent them on their way.

  2. Unreliable, but fast

    UDP didn't verify whether the packet reached their address or was delivered in order. This made him much faster but less reliable.

  3. No confirmation

    UDP didn't wait for acknowledgment or resend lost packets. If something didn't make the connection, it was simply lost.

Pros of UDP

  • Fast delivery

  • Perfect fit for the:

    • Streaming videos

    • Online gaming

    • Video calling

Cons of UDP

  • Less reliable

  • No guarantee of packet delivery in order

TCP is used for critical tasks where accuracy & reliability is non-negotiable.

Like, Sending very important documents or using bank websites.

UDP is used for tasks where speed & real time is essential.

Like, Video calling or Online gaming.

What is a Network protocol? 🤔

A network protocol is like a set of rules that computers follow to talk to each other over a network, like the internet or your home Wi-Fi. Imagine you're sending a letter to a friend—there's a process to follow: you write the letter, put it in an envelope, add an address, and give it to the mail carrier. Network protocols work similarly but for computers and data.

Why Do We Need Protocols?

  1. To avoid confusion: If computers didn't follow the same rules, data would be lost or misinterpreted.

  2. To ensure everything works together: Protocols make sure all devices, from your phone to a giant server, can communicate—even if they're made by different companies.

Why Does It Matter to You?

Whenever you send a message, watch a YouTube video, or browse the internet, network protocols are quietly working in the background to make sure everything works smoothly.

Even though you might not see them, they’re the reason you can play online games, stream your favorite shows, or chat with your friends without glitches! 🚀