[Bloat] Educate colleges on tcp vs udp

Hal Murray halmurray+bufferbloat at sonic.net
Thu May 27 03:42:50 EDT 2021


Erik Auerswald said:
> But I'm afraid the "learn tcp" part works more as a refresher than an
> introduction.  Remember this is the first meeting with an ack for most of my
> co workers.  To get the proper understanding I think the basics must be more
> hammered into them.

My 2 cents.

I would back up.  You need to understand how networks work before discussing 
TCP or UDP.

The internet is not like a phone system.  There are no connections within the 
network and hence no reserved bandwidth and nothing like a busy signal to tell 
you that the network is full.  (There are host-host connections, but the 
network doesn't know anything about them.)  Packets are delivered on a 
best-efforts basis.  They may be dropped, delayed, mangled, or duplicated.

Links have a max size packet they will support.  (MTU)  If you want to send 
larger data, the sender needs to break it down into packets that will fit and 
the receiver needs to put things back together.

A key concept is the bottleneck link.  If all the links are the same speed and 
there is no competing traffic, then the rest of network can deliver whatever 
the sending host can send.

There are two ways to get a bottleneck.  One is to have the outgoing link of a 
router be slower than the incoming link.  The other is to have some other 
traffic using one of the links your traffic is trying to use.

If you send faster than the bottleneck can support, the buffers will fill up.  
If packets arrive when the buffers are full, some packet will get dropped.  
(not necessarily the new one)

For something like FTP, and additional potential bottleneck is the software on 
the remote host.  Can it write to disk as fast as you can send over the 
network?

TCP is for things like FTP and web browsing - transferring large chunks of 
data.  UDP is for simple things like NTP or DNS.  TCP is generally implemented 
in the kernel.  UDP retransmissions are generally implemented by user code.

The hard part of TCP is figuring out how much traffic the bottleneck link can 
handle and keeping track as it changes.


-- 
These are my opinions.  I hate spam.





More information about the Bloat mailing list