Technology Choices Should Be Presented In Terms of Fundamental Design Tradeoffs

This insightful Hacker News comment differentiates TCP from UDP:

Fundamentally, TCP is designed to get all the bits to their destination. That’s great for file transfer, but not ideal for streaming video — at the transport level, there’s no way to decouple data rate from latency because it’s not allowed to drop anything.

UDP is the latency-prioritized transport protocol for the internet. It drops packets that it can’t handle because they are expected to contain out-of-date information anyway.

In other words, TCP is designed to get all the data to the other end, even if it takes longer (more latency).

On the other hand, UDP is designed to get data to the other end without delay, even if some of it has to be dropped.

TCP is a bus that slows down when it’s overloaded. On the other hand, UDP ejects some passengers so that it can go at its maximum speed.

I like this explanation because it captures the fundamental tradeoff. By contrast, the explanation I read in college textbooks — TCP is stream-oriented while UDP is packet-oriented, or that TCP is connection-oriented while UDP is connectionless — focuses on the mechanics of the abstraction. But the abstraction chosen is a consequence of the design goal, so we should start from the latter.

Saying TCP is stream-oriented is like saying that SUVs have higher ground clearance. That’s true, but only a consequence of their design for off-road use. Because the latter piece of information determines whether it’s right for you.

More technology choices should be presented in terms of the fundamental design goals, not details of how that goal is achieved. Once you understand the design tradeoff, then you should look at how the abstraction is defined, not before.

On-demand Leader. Earlier: IIT | Google | Solopreneur | Founder | CTO | Advisor