We just published a new Podcast episode featuring David “Tubes” Tuber and Carlos Rodrigues from Cloudflare. We talked about Cloudflare’s speedtest and more generally, Internet experience.
This is worth reading.
A few interesting things:
- More and more important traffic uses UDP
- The shift from TCP is driving optimizations that weren’t a priority before
- There’s an RFC for a QUIC perf test that includes requests per second
- CPU power states always matter when benchmarking
Once upon a time, much of the high-value and high-volume traffic on the Internet was TCP-based. Games and other real-time applications adopted UDP early to avoid the head-of-the-line blocking problems inherent in TCP’s design. However, these applications tend to use a relatively low traffic volume.
A few things (at least):
- The rise of video conferencing and remote work
- The use of UDP (QUIC) for large-scale content delivery
- The rise of QUIC as a general-purpose transport protocol that has many advantages over TCP and is at the core of HTTP3 (the web is moving to UDP)
As an example, below are the bitrates for TCP and UDP capture on my home router. This capture has all the traffic associated with the 50+ Internet-connected things in my house as well as:
- I did my normal work activity, which included:
- Web browsing to applications like Jira, HubSpot, our app etc.
- A Google Meet video call with one of my colleagues
- A YouTube video was streaming on a TV via a Chromecast
- One of the kids was playing online games on his Nintendo Switch
Blue is UDP, red is TCP.
I suspect some people will find this surprising. UDP completely dominates this typical workload. Notice the long periods of near TCP-silence
Why? YouTube uses QUIC/UDP for content delivery. Google Meet uses UDP for video and audio. It’s likely the kid’s game is hidden in the large amount of UDP traffic as well. The little red spikes are likely web browsing activity.
Note that other video conferencing applications like Zoom also use UDP.
That’s bitrate; let’s look at the packet count.
79% of packets are UDP. This isn’t your parent’s TCP-based Internet anymore.
QUIC As a General Purpose Transport Protocol
QUIC is a newish transport protocol that is based on top of UDP. It offers the same reliable delivery model of TCP and more. A simple way to think of a QUIC connection is as a bunch of TCP flows riding on top of the same UDP flow.
Describing all the goodness in QUIC is outside the scope of this article. A few interesting pieces include:
- Enables multiple simultaneous streams within a connection
- Loss in one stream does not impact delivery on the other streams (fixes TCP’s head-of-line blocking problem)
- Both reliable (stream) and unreliable (datagram) based streams are available within the same connection
- Application-level (not kernel) implementation
- Completely encrypted, not even the control information, such as the sequence number, is visible to the ISP or anyone else. This was a key design criterion.
To dig deeper, follow the rabbit trail from the Wikipedia QUIC page – https://en.wikipedia.org/wiki/QUIC. That page includes links to QUIC implementations in many languages.
Today QUIC is used extensively by Google. YouTube, Gmail, Search, and most other Google traffic use QUIC if you have a reasonably new browser.
But that’s far from all:
Finding more examples isn’t hard.
Given the many advantages of QUIC over TCP, we’ll likely see its usage continue to grow in all types of applications, from video conferencing to games and APIs.
HTTP (The Web)
Since its inception, HTTP, the protocol that underlies the web has been TCP based.
This is changing.
HTTP/3, the newest HTTP standard, is entirely based on QUIC to bring the benefits of QUIC to websites and applications.
Major CDN providers and HTTP libraries now already have full support for QUIC or are making progress. Cloudflare, for example, has extensive support (https://cloudflare-quic.com/).
It’s a brave new UDP world.
This well worth reading if you are into distributed systems.
I recently finished reading “The Deficit Myth: Modern Monetary Theory and the Birth of the People’s Economy“.
As the subtitle says, this book is focused on Modern Monetary Theory (MMT). Please read the book for a much better explanation but here’s the short version:
- There is an important difference between currency users and currency creators.
- Currency users are entities like provinces, people or businesses. That is, to get $1 it has to come from somewhere via revenue, taxes, salary, debt etc.
- The Federal government of a country with high monetary sovereignty (U.S., Canada, U.K.) is very different – it creates money when it spends. It does not tax or borrow to spend.
- The Federal government has a monopoly on creating dollars and can therefore not run out of dollars.
- This is where most trivial inspections of MMT stop, people jump to the conclusion that this implies there are no limits and the Federal government can spend whatever it wants and then they declare MMT crazy.
- What MMT actually says is that the amount of deficit doesn’t matter. The actual limit is the productive capacity of the economy. When the economy is operating at full capacity, prices will go up and therefore the limit of deficit spending is when inflation starts to rise instead of an arbitrary attempt to balance spending with taxation.
Try this simple thought experiment. Consider the economy as two buckets. The bucket on the left is the Federal government and the bucket on the right is the rest of the economy (businesses, people, etc). Remember, only the Federal government can create dollars.
What happens to the balance between these two buckets when the Federal government balances its budget? The amount spent from the left bucket into the right bucket balances equally with the amount taken out of the right bucket and put back into the left bucket via taxation. In this case the right bucket (economy) stays the same size.
Now consider the situation when the Federal government runs a surplus. Now the amount of money moving from the left bucket into the right bucket is lower than the amount of money moving from the right bucket to the left. That is, the amount of money available to businesses and people has been reduced.
The obvious third scenario is the Federal government running a deficit. That is, spending more than it takes in via taxation. In this scenario, the size of the right hand bucket (businesses, people) grows because less money is taken out by taxation than is being added by deficit spending.
That’s right, the non-government economy grows by Federal deficit spending. Think about it, if only the government can create dollars (it’s the law), which it does by spending, then how else could the rest of the economy grow?
The logic is very simple but it goes against all of our conditioning to think of Federal finances as a currency user but the reality is, the Federal government is a currency creator.
Given the role Federal financing plays in dealing with the pandemic and the attention the Federal deficit will get going forward, now is a good time to at least acquaint yourself with the concept of MMT. I promise the explanation of MMT in the book is better than mine.
Overall, this book is well worth your time and is very timely having come out during the pandemic. The only negative is that I feel it gets a little squishy and utopian with some of the implications of this powerful idea.
After reading this book I have a few questions on what MMT means to how we structure government:
- MMT gives the Federal government more leeway with spending but doesn’t imply the same for provinces (they are currency users). What does this mean for the somewhat arbitrary division of responsibilities between the Federal and Provincial governments? For example, in Canada, health care is a provincial responsibility and is a huge part of the provincial budget.
- MMT says that the real limit is not the deficit or debt but inflation. As long as inflation isn’t going up, more spending is fine. Would setting spending limits based inflation require a more fine grained way to measure inflation? The Federal government may need to be careful to not spend too much into one area. For example, if the Federal government decided it was going to double the amount of passenger trains or subways in the country but there is limited supply of trains, this would create great inflation in train costs and therefore reduce the effectiveness of the spending. Do specific targets like that require a ‘micro-inflation’ measure?