村口有一间”急递行”,专替山这头的人家往山那头的庄园送信送货。

从前只有一条办法:所有包裹排成一列,装上同一辆牛车,走那条唯一的独木桥。桥窄,只容一车。若前头那辆车的轮子陷进了泥,后面十几车的货——哪怕彼此毫不相干——也全都得干等着。更麻烦的是,牛车认的是”桥头那个岗哨”:每回过桥,都得先和岗哨来回验明正身、盖章、对暗号,折腾好几个来回,货才真正上路。哪天桥塌了改走别的道,一切又得从头再验一遍。

新掌柜来了,换了套章法。

他不再用一辆牛车走独木桥,而是雇一群脚夫,每人牵一头骡子,各走各的小径。这一包药材、那一捆布匹、另一函书信,本就互不相干,如今便分头上路。半路上若有一头骡子在溪边打了个滑、耽搁了——不打紧,别的骡子照旧翻山过岭,该到的先到,谁也不必替谁干等。

每个脚夫怀里都揣着一块掌柜亲手刻的木牌,牌上一个只有两家才认得的记号。庄园的门房,认的是这块木牌,不是脚夫走的哪条路。所以山里那座桥塌了也好、脚夫临时绕到北边的旱道也好——只要木牌一亮,门房照旧点头放行,不必重新盘问”你是谁、从哪来”。同一桩买卖,半路换了三条路,在门房眼里始终是同一桩。

还有一层巧思:那些常来常往的老脚夫,门房早把他们的木牌记在心里。下回再来,牌子一晃,头一句话就能直接谈正事,连”请通报、待查验”的工夫都省了。

而且,每个包裹一出急递行的门,就当场锁进一只上了封蜡的匣子——不是到了桥头才想起来上锁,而是打从第一步起就没敞开过。

——到这儿你大概已经认出来了:这间新章法的急递行,就是 QUIC

QUIC 是一种跑在 UDP 之上的传输协议,也是 HTTP/3 的底座。它要治的,正是老 TCP 的两块心病。其一,TCP 把一条连接上的所有数据塞进单一有序字节流,前面丢一个包,后面就算早到也得排队等重传——这就是 head-of-line blocking(队头阻塞)。QUIC 把一条连接切成多条相互独立的 stream,一条流丢包只卡自己,别的流照跑。其二,TCP 连接由”源 IP + 源端口 + 目的 IP + 目的端口”这个四元组认定,你从 Wi-Fi 切到蜂窝,IP 一变连接就断、得重连。QUIC 给每条连接发一个与网络路径无关的 connection ID,路径变了、IP 换了,凭 ID 仍是同一条连接,这叫 connection migration。再加上它把 TLS 1.3 握手和传输握手合二为一,对老熟人还能 0-RTT——第一个来回就带上应用数据;而且加密是强制的,不存在明文的 QUIC。

隐喻对应:

  • 急递行的两头 = 一条 QUIC 连接的两端(client 与 server)
  • 各走各小径的骡子 = 相互独立的多条 stream
  • 一头骡子打滑不耽误别的 = stream 级别的丢包隔离,避免 head-of-line blocking
  • 刻着记号的木牌 = connection ID
  • 门房认牌不认路 = 连接身份与网络路径解绑
  • 桥塌改道、牌子照用 = connection migration(Wi-Fi ⇄ 蜂窝切换不断连)
  • 老脚夫一晃牌就谈正事 = 0-RTT 恢复
  • 出门即上封蜡的匣子 = 强制的、从握手起就内建的加密(集成 TLS 1.3)
  • 旧法的独木桥单行牛车 = TCP 的单一有序字节流与队头阻塞
  • 旧法每次改道重新验身 = TCP 连接绑死四元组,路径一变即断

At the edge of the village stood a courier house, in the business of carrying letters and parcels from the families on this side of the mountain to a manor on the far side.

For years there had been only one way to do it. Every parcel was lined up single file, loaded onto one ox-cart, and sent across the single narrow footbridge — wide enough for just one cart. If the lead cart sank a wheel in the mud, the dozen carts behind it — however unrelated their cargo — all had to wait. Worse, the cart was known only to the sentry at the bridgehead: every crossing began with a long back-and-forth of proving who you were, stamping seals, trading passwords, several rounds before any goods actually moved. And the day the bridge washed out and traffic was rerouted, the whole verification had to start over from scratch.

Then a new steward took over, and changed the method.

He gave up the single cart on the single bridge. Instead he hired a band of porters, each leading one mule, each taking his own path. The bundle of herbs, the roll of cloth, the packet of letters — unrelated to begin with — now set out separately. If one mule slipped at a stream and fell behind, no matter: the others crossed the ridges as before, the ready ones arrived first, and none had to idle waiting on another.

Each porter carried a small wooden token the steward had carved by hand, marked with a sign only the two houses knew. The manor’s gatekeeper recognized the token, not the road the porter walked. So whether the mountain bridge collapsed or a porter detoured to the dry northern track — one flash of the token and the gatekeeper waved him through, no need to ask again “who are you, where from.” A single errand might switch roads three times; to the gatekeeper it was always the same errand.

There was one more cleverness. The porters who came and went often, the gatekeeper had already committed their tokens to memory. Next time, a flash of the token and the very first sentence could get straight to business — not even the wait of “let me announce you, let me check” remained.

And every parcel, the moment it left the courier house, was locked then and there inside a wax-sealed box — not sealed only at the bridgehead, but never once left open from the first step.

— By now you have probably recognized it: this new-method courier house is QUIC.

QUIC is a transport protocol that runs over UDP, and the foundation beneath HTTP/3. It exists to cure two old ailments of TCP. First, TCP crams all of a connection’s data into a single ordered byte stream: lose one packet near the front and everything behind it, even if it already arrived, must queue for the retransmission — this is head-of-line blocking. QUIC splits one connection into many independent streams; a lost packet stalls only its own stream while the others keep flowing. Second, a TCP connection is identified by the four-tuple of source IP, source port, destination IP, destination port: switch from Wi-Fi to cellular, your IP changes, and the connection dies and must be rebuilt. QUIC issues each connection a path-independent connection ID; change paths, change IP, and by the ID it is still the same connection — this is connection migration. On top of that it merges the TLS 1.3 handshake with the transport handshake, so for a known peer it can even go 0-RTT — carrying application data in the very first round trip — and encryption is mandatory: there is no plaintext QUIC.

Metaphor mapping:

  • The two ends of the courier house = the two ends of one QUIC connection (client and server)
  • Mules each on their own path = mutually independent streams
  • One mule slipping without delaying the rest = per-stream loss isolation, avoiding head-of-line blocking
  • The carved wooden token = the connection ID
  • The gatekeeper knowing the token, not the road = connection identity decoupled from the network path
  • Bridge collapses, token still works = connection migration (Wi-Fi ⇄ cellular without dropping)
  • The familiar porter getting straight to business = 0-RTT resumption
  • The wax-sealed box from the moment of departure = mandatory encryption built in from the handshake (integrated TLS 1.3)
  • The old single-file cart on the one bridge = TCP’s single ordered byte stream and head-of-line blocking
  • The old re-verification on every reroute = TCP binding to the four-tuple, dropping the moment the path changes