Category Archives: General

The Rise of UDP

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.

What’s changed?

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.

Modern Monetary Theory (MMT) and the Federal Deficit

I recently finished reading “The Deficit Myth: Modern Monetary Theory and the Birth of the People’s Economy“.

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?

WE Charity and Conspiracy Theories

I’m on a mission to not become a grumpy old, conspiracy lover as this seems to be the fate of many old men. This post is part of me working on that.

The fervor over the WE charity stuff the last couple weeks has been crazy.

First the simple part. This whole thing is a silly own-goal by the Liberals. Even 100% above board, the optics are bad. This kind of thing is just too easy to weaponize and someone should have known it would explode and blocked it. Also, though I doubt recusal would have stopped any of the opposition or media fervor, Trudeau and Morneau should have recused themselves when this arrived at the cabinet table.

As a general rule, most things attributed to conspiracy theories are much more accurately explained by naivety, mistakes, stupidity or a different definition of success.

For those not following this mess closely, here are a few facts:

  • Grégoire Trudeau, the PM’s wife was paid $1,400 in 2012 to attend a WE event. This was before Trudeau was the Liberal party leader [source].
  • Since 2016, Margaret Trudeau (PM’s mother) has spoken at 28 WE events about mental illness. A topic which she has spoken about with other charities and on which she has written at least one book. The total paid was about $250K [source].
  • Alexandre Trudeau, Justin’s brother, was paid $32K to speak at several WE events [source].
  • Politicians of all colors have shown support for WE including the two front runners for the CPC leadership.
  • WE got significant funding from the previous conservative government. According to recent testimony, federal funds as a  % of the charity’s total revenue were higher with the previous conservative government [source].
  • The government has parliamentary approval for significant financial help to students
  • WE was selected to administer a program that would have paid students to do volunteer work.
    • One might quibble that this is no longer volunteer work but if the choice is to write a cheque or tie it to helping out local organizations that are struggling during a pandemic is this really an evil idea?
  • The testimony of the civil service and politicians confirms the initial messaging that the civil service, not the politicians, chose WE to deliver the program.
    • This one especially seems to trigger conspiracy theories but there hasn’t been any evidence to the contrary presented that I’ve found.

I don’t understand how people can look at that and see conspiracy or corruption. Do you really think that Trudeau sat at the cabinet table and said (in a Montgomery Burns voice with templed fingers):

Hmmm… I can get my mother more speaking spots to talk about mental health at WE charity events if we give the contract to WE… Hmmmm

This is a cartoon for a reason

Seriously? Because that’s pretty much what you have to believe happened to see corruption here. Naivety, maybe. Maybe it’s not fair that being credible on mental health and being the PM’s mother makes you a valuable commodity for charities. Unless you think Margaret Trudeau shouldn’t be allowed to make money that line of thinking sounds more like Tall Poppy Syndrome than rationality.

So seriously, corruption or criminality?

What would the quid-pro-quo be? WE gives Margaret more speaking slots (because 28 isn’t already a lot) and Justin gets to inherit some portion of that after she dies? Or maybe Trudeau invented a time machine and went back to 2015 to tell WE that if they hire his mother a bunch he will reward them when the pandemic comes.

Getting to the place where WE gets the contract doesn’t require malice or conspiracy. Given the intensity of what’s going on in a government trying to deal with the pandemic, a more plausible thought process that gets to the WE charity being selected is:

The civil service says WE can do this? OK, I trust the civil service to do their job and vet them. From what I know of WE they seem like a decent bunch. All in favour? Done. On to the next huge decision that’s required to get the country through this mess.

I wrote this before the PM appeared at the finance committee. That session indicates the PM did ask for extra diligence on WE administering the program because he was concerned it would look bad. After this CBC did an interview with a CPC strategist that claims this shows Trudeau knew he had a conflict…. straight to the conspiracy solution again. Maybe he decided to take the political risk to get the program out the door?

Why do people jump to conspiracy?

It’s easy to see why the other parties do this. A ‘scandal’ is an easy way to discredit a political opponent. Immoral, but easy.

A bigger question we’re going to have to grapple with as a society is why the media gave this so much oxygen and so little critical thought. We’re in the middle of the largest disruption to the economy in a very long time. Given everything going on, is this really worth the coverage it has received? Where is the deep analysis or discussion on how Canada is doing relative to other countries or what’s working or not working in other places? Or if this is a big deal, at least wait to get facts before propagating theories put forward by people who have a vested interest in doing damage. There are no take backs after a conspiracy theory has been let loose.

I started this by suggesting that most things that can be explained by conspiracy theory are usually better explained much more simply. The same applies to the media’s coverage of this ‘scandal’. It’s just soooo much easier to cover salacious and vague stuff like this than it is to actually do real journalism.

If you are interested in a reasonable discussion on this that avoids conspiracy theories and overconfidence, consider taking the 30 minutes to listen to Peter Mansbridge’s podcast episode on the topic:

Is that what journalism was in the past? If so, I pine for the past.

Or better yet, watch the testimony by the civil service, PM etc and decide for yourself vs. forming opinions based on headlines.