From: Jonathan Morton <chromatix99@gmail.com>
To: Taraldsen Erik <erik.taraldsen@telenor.no>
Cc: bloat <bloat@lists.bufferbloat.net>
Subject: Re: [Bloat] Educate colleges on tcp vs udp
Date: Sun, 23 May 2021 13:23:20 +0300 [thread overview]
Message-ID: <7FBA3F6F-CBA1-4B19-B48F-10927EDA17A9@gmail.com> (raw)
In-Reply-To: <aa87bb559e31429d936eb452ecda55b3@telenor.no>
> On 21 May, 2021, at 9:01 am, Taraldsen Erik <erik.taraldsen@telenor.no> wrote:
>
> I'm getting some traction with my colleges in the Mobile department on measurements to to say something about user experience. While they are coming around to the idea, they have major gaps in tcp/udp/ip understanding. I don't have the skill or will to try and educate them.
>
> Is there good education out there - preferably in the form of an video - which I can send to my co workers? The part of tcp using ack's is pure magic to them. They really struggle to grasp the concept. With so basic lack of understanding it is hard to have a meaningful discussion about loss, latency an buffering.
>
> I don't mean to talk them down to much, they are really good with the radio part of their job - but the transition into seeing tcp and radio together is very hard on them.
I don't have a video link to hand, but let's tease out the major differences between these three protocols:
IP (in both v4 and v6 variants) is all about getting a package of data to a particular destination. It works rather like a postal system. The package has a sender's address and a recipient's address, and the routers take care of getting it to the latter. Most packages get through, but for various reasons some packages can be lost, for example if the sorting office (queue) is full of traffic. Some packages are very small (eg. a postcard), some very large (eg. a container load), and some in between.
UDP is an "unreliable datagram" protocol. You package it up in an IP wrapper, send it, and *usually* it gets to the recipient. It has an additional "office" address, as the postal system only gets the package to the right building. If it doesn't arrive, you don't get any notification about that - which is why it is "unreliable". Each package also stands on its own without any relationship to others, which is why it is a "datagram". Most UDP packets are small to medium in size.
TCP is a "reliable stream" protocol. You use it when you have a lot of data to send, which won't fit into a single datagram, or when you need to know whether your data arrived safely or not. To do this, you use the biggest, container-sized packages the post office supports, and you number them in sequence so you know which ones come first. The recipient and the post office both have regulations so you can't have too many of these huge packages in the system at once, and they reserve the right to discard the excess so they can function properly (this is "congestion control"). So you arrange for the recipient to send the containers back empty when they've been received (they collapse to a small size when empty), and then you know there's room in the system for it to be sent out full again, with a fresh sequence number (this is the "stream"). And if you notice that a particular container *didn't* come back in the expected sequence, you infer that it got lost somewhere and send a replacement for its contents (making the delivery "reliable").
In fact, the actual containers are not sent back, but an acknowledgement postcard basically saying "all containers up to XXX arrived safely, we have room for YYY more, and the post office told us to tell you to slow down the sending rate because they're getting overwhelmed." Some of these postcards may themselves get lost in the system, but as long as some *do* get through, the sender knows all is well.
It's common to use TCP for transferring files or establishing a persistent command-and-control connection. It's common to use UDP for simple request-response applications (where both the request and response are small) and where timeliness of delivery is far more important than reliability (eg. multiplayer games, voice/video calls).
- Jonathan Morton
next prev parent reply other threads:[~2021-05-23 10:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 6:01 Taraldsen Erik
2021-05-23 10:23 ` Jonathan Morton [this message]
2021-05-23 18:47 ` Erik Auerswald
2021-05-23 21:02 ` Jonathan Morton
2021-05-23 21:42 ` Erik Auerswald
2021-05-26 22:44 ` Mark Andrews
2021-05-27 3:11 ` Erik Auerswald
2021-05-24 18:51 ` Erik Auerswald
2021-05-25 6:38 ` Taraldsen Erik
2021-05-26 18:09 ` Dave Taht
2021-05-27 6:32 ` Taraldsen Erik
2021-05-27 7:42 Hal Murray
2021-05-27 12:15 ` Jonathan Morton
2021-05-27 22:17 ` Kenneth Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/bloat.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7FBA3F6F-CBA1-4B19-B48F-10927EDA17A9@gmail.com \
--to=chromatix99@gmail.com \
--cc=bloat@lists.bufferbloat.net \
--cc=erik.taraldsen@telenor.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox