Internet Transportation TCP and UDP

background-3228704_1920

 

When you loaded this webpage today, you used an application like a phone app or a web browser. The application then needs to transport the web page information held on web-servers likely states away. Your computer uses either the transport protocol TCP or UDP to transport effectively.

 

TCP

 

TCP stands for Transmission Control Protocol. TCP is the most used protocol for web browsing, checking social media, and online shopping.

The reason TCP is most used is because of its reliability and has few errors. When you first click a link, you ask the web server holding the website for access to the web page. The web server then acknowledges this by sending a stream of TCP packets. Which you can think envelope-3172770_1280of as little fragments of the website, that must be rebuilt when it reaches you.

To ensure the reliability of the stream of packets, they are numbered and error checked. So, after you receive packet 1 you send a message back saying you received it, and you can now take packet 2. If packet 2 gets lost on the way back, you will not send a message back acknowledging you received it. The web server notices this error and will retry until you acknowledge you received packet 2. You can then continue the process until all the packets are sent and rebuilt in your web browser.

A good example of how a TCP conversation takes place.

tcp example

 

UDP

 

A con of TCP is it’s too slow for real-time information because of the back and forth acknowledgements. For communications that need to be quick, we use UDP. UDP stands for User Datagram Protocol. A datagram is essentially a packet.

To increase communication speeds, UDP cut out the packet numbering and acknowledgments. The back and forth increases the latency of communication.

Instead of loading a webpage, let’s say you are watching Netflix. When you start a movie the Netflix server holding the movie starts streaming UDP packets to you. This is great because you can view 4k video without having to wait hours for it to download.

But, when a group of packets gets lost, you then get a buffering loading screen or theLoading_icon video gets choppy. Once the UDP packets find you again the stream will restart.

UDP is also used in online video games. You can tell when something is wrong with a player’s UDP stream if, they lag around the map.

 

TLDR

To access information held throughout the world on servers we employ the help of transport protocols. If we need the information reliably sent to us without errors we use the TCP protocol. TCP requires back and forth acknowledgments to make sure no packets get lost in transit. If packets do get lost, it will be re-sent. TCP also numbers packets to ensure the data is rebuilt effectively. But, if we need information quickly like in the case of video streaming we use the UDP protocol. UDP is unreliable because it doesn’t have acknowledgments, packet numbering, or re-sending of packets. However, UDP is very fast and can handle large video streams.
Thank you for reading!
Leave a comment below or contact me for
questions, ideas, or concerns!
-Tristian

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close