Jump to content

TCP vs UDP

Dusty_A

Hey, guys in regard to the latest video. UDP is not necessarily more resistant to drop out. The basic difference between TCP and UDP is that UDP's packet is smaller with less overhead as barebone UDP itself doesn't care about packets being received properly. i.e it's "best-effort" method. Whereas TCP packet is larger with more overhead to ensure all the packets are received. Applications can then decide what to do what the packets they've received. TL;DR : UDP is not considered reliable data transfer compared to TCP as it doesn't handle packet dropping natively.

Correct me if i'm wrong.

Link to comment
Share on other sites

Link to post
Share on other sites

Confused about a post about this but yes you are correct.

 

But the current movement is actually slowly moving more heavily towards UDP for the exact reason of overhead. This has already been a thing with protocols such as RTP and RTSP which assist with data guaranteed delivery. For ex. Google's QUIC uses UDP with instead of TCP and controls packet reordering at L7 which gives you the benefits of UDP with little drawbacks.

 

Protocols like QUIC are being developed and pushed towards UDP as TCP just cannot keep up and re-transmitted traffic (traffic lost due to drops or just latency) make up single digit percentages of total bandwidth on ISP backbones which is too much. Cloudflare is probably using something similar, I have not looked into it yet.

 

But all in all UDP is NOT more resistant to drops without assistance. But when Linus said "built on a protocol that is more resistance to drop outs" he is referring to my point about QUIC and how it uses assistance to guarantee delivery

Link to comment
Share on other sites

Link to post
Share on other sites

First off, unless you control all routers and switched equipment to its final destination... packet loss will happen

 

Its expected as traffic goes outside your network to the public internet, there will be some lost packets  some connections worse than others, for example 4g will have much higher packet loss on average as towers are oversubscribed and signal strength will fluctuate 

 

Good news tcp has many extensions and congestion control algorithms to handle packet loss and optimize for the network conditions.

 

Things like SACK, nagile (small packets) etc will help you get best performance on the wide variety of connections out there

 

However, with the advent of VoIP, streaming, and other real time protocols delay and latency are a bigger consideration.

You will get much better "perceivable performance" by sending traffic and not  caring about ACK and possible retransmission.

 

This is one of the big benefits of UDP

Link to comment
Share on other sites

Link to post
Share on other sites

I was going to post a joke about UDP, but you might not get it.

 

Slayerking92

<Type something witty here>
<Link to some pcpartpicker fantasy build and claim as my own>

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×