In computer networking, there are a variety of different terms used to describe the process of moving bits of data from one place to another. Today I’m going to compare three oft-used terms—throughput, latency, and jitter—through the antics of our usual friends, Bob and Alice.

Alice and Bob like to send each messages, but they live across town from each other, making communication a bit difficult. So, they hire various courier services to deliver their messages as fast as possible.

Throughput (often imprecisely called bandwidth) is a measure of how many messages can be sent in a particular time frame—for example, a hundred pages of messages per day. Unfortunately, this measure reveals much less information than you’d initially think. For example, two different courier services could both send one hundred pages of messages per day, but have vastly different models. The first might pick up a single package of a hundred pages in the morning, and deliver it in the evening. The second might only be able to carry a single page at a time, but can deliver each page in only five minutes. Nevertheless, if the second has exactly one hundred pick-up times per day, it has exactly the same throughput as the first—one hundred pages per day.

Latency is one key measure for distinguishing different services that have identical throughput. Also called “lag”, this measures how long it takes a courier to get from Alice to Bob. The latency of the first courier from above is one day; the second courier’s latency is only five minutes. Since they both have identical throughput, the second courier is definitely preferable to the first.

However, connections often differ in both latency and throughput. For example, imagine a courier that takes a day to deliver a single package of a thousand pages, compared to a courier who delivers only a hundred pages a day, but each page can be delivered in only a few minutes. Alice might prefer the first if she’s trying to send a library of books to Bob, but might prefer the second if she’s trying to carry on a conversation. Even though the throughput of the first is better, a conversation isn’t so much concerned about how many pages can be sent in a day—it’s more interested in how fast the responses can be sent back and forth.

This, of course, doesn’t mean that the throughput is completely unimportant. A courier that could send a message every thirty seconds but could only send one word at a time would probably not be preferable to one that sent a whole page every two minutes, unless only two or three words needed to be sent before requiring a response. The best connection is the lowest-latency one that can accommodate messages of approximately the same size that need to be sent without a response. But what if the time it takes the courier to deliver messages varies?

Jitter is a measure of the variation in latency. For example, one courier might be able to send one page every minute, and each page takes exactly one hour to reach its destination. Meanwhile, another courier can also send a page every minute, but each page can take anywhere from five minutes to several hours to be delivered. But if the average delivery time is also one hour, then both couriers have identical latency. But the second courier has much higher jitter than the first. When does this matter?

Let’s say that Alice is sending a novel to Bob. As soon as Bob gets a page, he starts reading—but, being a slow reader, it takes him an hour to finish a single page. If Alice uses the first courier, then Bob will be able to start reading the novel when the very first page arrives, and continue uninterrupted until he finishes the last page. As soon as he finishes one page, the courier arrives with the next one. If Alice uses the second courier, however, then sometimes the courier will arrive before he finishes a page (not a problem), and sometimes the courier will arrive quite a while after he finishes a page, forcing Bob to have to wait, annoyed, wondering how the story will continue.

Bob can still have an uninterrupted reading experience with the second courier; he just needs to exercise some patience before picking up that first page. If he waits a few hours before he starts reading, then future jitter doesn’t matter as much. After he finishes the first page, even if the next courier is a bit late, he still has the previously-delivered second page. As long as the courier averages at an hour page (Bob’s reading rate), he’ll be able to read cover to cover without any maddening gaps in the middle of the story.

But what if Bob reads faster than a page an hour? What if he reads a page every half an hour? Well, using either of the two couriers, he can simply wait for half the time required to deliver the entire novel before he starts reading. That way, when he finishes the first half of the book (that was delivered before he started), half of the second half will be delivered. Once he finishes that half, half of what’s remaining will have been delivered. He can continue in this same way until he finishes the penultimate leaf, just as the final page is being delivered, once again enjoying an uninterrupted reading experience.

Leave a Reply