▶ Cinematic fable · Watch on YouTube ▶ 影片版寓言 · 在 YouTube 观看
沧浪江畔的”云津渡锦行”,接的是全天下最轻的帖子,发的是全天下最重的船。
各州绸商派快艇来订货,递进前津总署窗口的不过是一枚三寸长的竹筹,上面刻着一行小字:”扬州四号埠,订云锦二百匹。”总署掌事沈阔接过竹筹,看一眼不过半息工夫;可后院十二座临江水阁织坊要交这笔货,却得装满整整二十口楠木大箱、压沉一艘吃水五尺的乌篷重船。
偏偏锦行立过一条传了二十年的老规矩:外州绸商只认前津总署的大门与”云津渡锦行”的总号官印。
为了守这条规矩,沈阔每次收下竹筹,都要先刮去商家的埠头名号,改成”交前津总署沈阔收”,派学徒送进某座水阁;等水阁织完二百匹云锦,又得套上牛车,吭哧吭哧拉回前津总署那扇一丈宽的青石窄门里,由沈阔核对旧账、盖上”云津渡锦行”总印、重新写上”发往扬州四号埠”,再从总署门前的小码头装船出海。
起初只有三座水阁时,窄门还勉强转得开。等到生意兴旺、后院扩到十二座水阁,怪事发生了——
十二座水阁的织机才开了一半,前津总署那扇一丈宽的青石门却从五更堵到了半夜。门外递竹筹的快艇三息就能收完十支,门洞里往外拉云锦的牛车却顶死了辕木,进不去也出不来。更叫人憋闷的是,十二座水阁明明背靠着浩浩荡荡的沧浪大江,各自都有宽敞的后水门,却只能眼睁睁看着大江空荡荡,硬把万斤重箱往沈阔那道窄门缝里塞。
水阁总管林清晏登上总署望楼,看了一眼堵成长龙的牛车,只问了沈阔一句话:
“进门的是三寸竹筹,出门的是万斤重船——凭什么重船非要回头钻你这扇收竹筹的针眼?”
当晚,林清晏把老规矩彻底翻了过来:
从明日起,商家递进来的三寸竹筹——上面写着“扬州四号埠呈,云津渡锦行收”——沈阔一个字也不许改。他只管挑一座最清闲的水阁,把原封不动的竹筹塞进一只院内布袋,袋口挂一块木牌写上“送七号水阁侧门”,让人隔墙递过去。七号水阁拆开布袋,照着竹筹上原本留着的”扬州四号埠”,直接在自家后水门装满云锦大船,在封条上盖上“云津渡锦行发”,推开后闸直入沧浪大江,顺流直奔扬州——连一片船帆都不必再绕回前津总署!
沈阔听得眼睛发亮,连夜让人铸了十二块一模一样的”云津渡锦行”铜牌,分挂在十二座水阁檐下——毕竟水阁账房若不挂总号铜牌,见了写着”云津渡锦行收”的竹筹只会当成投错门的外信扔出去,封船时也没资格盖总号的名头。
谁知第二天清晨第一声鸡叫,乱子就出了。
一名初来乍到的徽州船老大摇橹停在渡口三岔河心,扯着嗓子朝岸上喊了一嗓子:“敢问哪一扇门是云津渡锦行?”
话音未落,后院墙头十二座水阁的伙计瞧见自家檐下挂着铜牌,齐刷刷探出脑袋高喊:”我这儿是!”“往我这儿摇!”船老大哪分得清总署和水阁,顺手把船摇进了喊声最响的一号水阁。不到半个时辰,一半商船全挤进了一号和二号水阁,后头十座水阁冷冷清清,沈阔手里的分派账册成了一张废纸。
沈阔一拍脑门,当天晌午便立下“哑牌规矩”:
十二座水阁檐下的”云津渡锦行”铜牌统统摘下来,锁进各阁不见天日的内堂密室里。往后凡有外客在三岔河心高喊”谁是云津渡锦行”,十二座水阁一律闭嘴装哑,唯独前津总署的沈阔一个人许开口应声;可一旦沈阔用院内布袋把竹筹塞进了某座水阁的侧门,阁内账房抬头看见密室里供着的铜牌,便认下这桩买卖,后水门发出的锦船也照旧堂堂正正盖上”云津渡锦行”的大印。
这一招立竿见影。前津总署门前再不见一辆牛车,沈阔摇着折扇收竹筹,十二座水阁后闸千帆竞发,吞吐量一夜翻了十倍。
直到那年深秋,皇商大单涌来,江边地界不够用了。林清晏翻过东边的青石岭,在十里外的栖霞谷新开了八座大水阁,谷口溪流同样直通沧浪大江,只是从前津总署往栖霞谷送信,必须跨过三座官府设立的官驿石桥。
开张头一天早上,沈阔挑出一支竹筹,照老法子塞进写着”送栖霞谷三号阁”的院内布袋,交给跑腿小厮上路。
一炷香后,沈阔正喝着茶,忽见官驿驿卒急匆匆跑进总署,恭恭敬敬递上一支竹筹:”沈掌事,刚从一号石桥转回来的信,请您签收!”
沈阔低头一看,差点把茶盏摔了——正是他一炷香前亲手发出去的那支扬州竹筹! 他不信邪,重装一只布袋再发;又过一炷香,驿卒满头大汗又把同一支竹筹送回了总署案头。整整一上午,几十支竹筹在总署和一号石桥之间来回打转,栖霞谷八座水阁连一根丝都没织上。
老巡驿赵叔路过桥头,看了一眼就笑了:”沈掌事,你那院内布袋上的木牌,只在自家院墙里管用!一上官驿石桥,桥官按朝廷驿规,第一件事就是扒掉你那只私家布袋,只看里头竹筹正身写的收信人。竹筹上明晃晃刻着’云津渡锦行收’——桥官翻开官驿舆图一查,’云津渡锦行’在哪儿?不就在你前津总署吗!他不往你这儿送往哪儿送?”
沈阔愣在当场:改竹筹上的收信人吧,到了栖霞谷没法用总号大印直发商船;不改吧,一过官驿石桥就被桥官按舆图踢回总署!
林清晏赶到桥头,取过一支竹筹端详片刻,转身从驿站买来一摞过境专用的火漆竹筒。
“竹筹一字不改,石桥规矩也不破。”林清晏把刻着“扬州四号埠呈,云津渡锦行收”的竹筹原封不动塞进竹筒,封上蜡,在竹筒外壁清清楚楚写上一行官驿地址:“前津总署发,栖霞谷三号阁亲启。”
这一次,三座官驿石桥的桥官只验竹筒外壁的”栖霞谷三号阁”,一路快马放行。竹筒到了栖霞谷三号阁,账房啪地敲碎外筒扔进废纸篓,露出里头完好无损的三寸竹筹——既看得见”扬州四号埠”的真址,又对得上内堂密室里的”云津渡锦行”哑牌。当天傍晚,一艘艘满载云锦的大船便从栖霞谷溪口直驶沧浪大江,扬帆远去。
——到这儿你大概已经认出来了:这就是大规模高性能四层负载均衡里的直接服务器返回(Direct Server Return, DSR)与三层直接服务器返回(L3DSR)。前津总署是四层负载均衡器(如 IPVS DR 模式、Meta Katran、Cilium DSR);”云津渡锦行”总号是公开的虚拟 IP(VIP);三寸竹筹与万斤锦船是极不对称的请求包与响应流;最初隔墙递送的院内布袋是二层 MAC 地址重写;锁在内堂闭嘴不应声的”哑牌”是后端挂在本地回环网卡(lo)上并开启 ARP 抑制的 VIP;而跨过官驿石桥(三层路由器)时套在外面的火漆竹筒,正是 IP-in-IP 或 GUE / Geneve 隧道封装的 L3DSR。
这是什么
在绝大多数互联网业务(视频流、对象存储下载、CDN、高吞吐 API)里,进出流量天生极度不对称:客户端发来的请求往往只有几百字节(一枚 HTTP GET),而服务端吐回去的响应动辄几兆甚至上百兆字节。
传统的对称式负载均衡(七层反向代理或四层 SNAT / Full-NAT)要求请求和响应都必须原路穿过负载均衡器:入站时负载均衡器把目的地址改成后端真实 IP(RIP)、把源地址改成自己;出站时后端把庞大响应发回负载均衡器,再由它把源地址改回虚拟 IP(VIP)转给客户端。结果,后端机器扩了十倍,所有出站大象流却全卡在负载均衡器的网卡带宽与连接跟踪表(conntrack)瓶颈上。
直接服务器返回(DSR) 彻底拆开了进出路径,让轻巧的请求走负载均衡器,沉重的响应由后端服务器直连客户端返回:
- 二层 DSR(L2 DSR,MAC 重写):当负载均衡器与后端处在同一二层广播域时,负载均衡器收到发往
VIP的数据包后,完全不碰三层 IP 头(保留客户端真实源 IP 和目的VIP),只把二层以太网帧的目的 MAC 地址改写成选定后端的网卡 MAC。 - 回环网卡绑定
VIP与 ARP 抑制:后端服务器之所以不会丢弃目的地址为VIP的包、且能用src IP = VIP直接给客户端回包,是因为每台后端都在本地回环接口lo上配置了VIP/32。为了防止故事里”十二座水阁齐声抢答”的 ARP 抢劫(ARP Flux),Linux 后端必须配置内核参数arp_ignore=1与arp_announce=2——物理网卡对局域网内询问VIP的 ARP 广播一律保持沉默,只有负载均衡器对外宣告VIP。 - 三层 DSR(L3DSR,隧道封装):现代云数据中心普遍采用跨机架的 Spine-Leaf 三层路由网络。一旦跨过三层路由器,二层 MAC 头就会像私家布袋一样被剥离;路由器一看内层目的 IP 是
VIP,就会按路由表把包踢回负载均衡器形成死循环。L3DSR(如 Meta Katran 的 IP-in-IP、Google Maglev 的 GUE、或 Cilium 的 Geneve / TCP Option DSR)把原始 IP 包原封不动塞进一层外层隧道头(外层目的 IP 为后端RIP)。三层路由网按外层RIP把包送到任意机架的后端;后端剥掉外层壳,拿到客户端真实 IP 与VIP,随后不走隧道、直接以src = VIP把响应大流送上公网或骨干网。
为什么重要
DSR / L3DSR 让四层负载均衡摆脱了出站带宽的物理枷锁——几台仅处理入站小包的负载均衡器,就能轻松调度身后数百 Gbps 甚至数 Tbps 的出站流量,同时无需任何 X-Forwarded-For 或 PROXY Protocol 就能在内核四层保留客户端真实源 IP。
但在生产环境落地 L3DSR 时,有三个极容易踩中的深水暗礁:
- 外层火漆竹筒撑爆桥洞(MTU 与分片黑洞):L3DSR 在原始包外多套了一层
IP-in-IP(20 字节)或GUE / Geneve(28~50 字节)隧道头。如果客户端发来一个满载 1500 字节的上传大包(如HTTP POST),套壳后就会超出机房物理网络 1500 字节的 MTU 上限!只测短小的GET请求时一切正常,一传大文件连接就神秘卡死。工程上必须在底层开启巨型帧(Jumbo Frames)、在边缘做 TCP MSS 钳制(MSS Clamping),或正确处理路径 MTU 探测。 - 门卫把自家人当假冒犯拦下(反向路径过滤
rp_filter与云厂商防伪检查):因为后端进站走的是RIP隧道包,出站发的却是源地址为VIP的裸包,路径天生不对称。如果后端开启了严格的 Linux 反向路径校验(rp_filter=1),或者公有云弹性网卡开着默认的”源/目的 IP 检查”(Source/Destination Check),网卡和内核会把后端发出的src = VIP响应包当成伪造源地址攻击当场丢弃。 - 退信也得找回同一座水阁(ICMP 差错报文一致性哈希):如果客户端到后端的回程路上遇到窄路,中间路由器退回来的
ICMP Packet Too Big差错包目的地址也是VIP,会先落到负载均衡器头上。负载均衡器必须拆开 ICMP 载荷里嵌着的内层五元组,用完全相同的一致性哈希算法(如 Maglev 环)把这封退信精准转给正在发船的那一台后端,否则连接就会永远停在重传死局里。
它道出了高性能网络架构里一条极迷人的不对称法则:调度权不必等于搬运权——谁最懂分派,就让谁只碰那枚三寸竹筹;至于万斤重船,大江就在身后,何必回头。
隐喻对应表
- 三寸订货竹筹与压沉五尺的万斤云锦船 —— 极度不对称的入站小请求(
HTTP GET/ 信令)与出站大响应流(视频块、镜像层、数据流) - “云津渡锦行”总号与前津总署沈阔 —— 对外公布的虚拟 IP(VIP)与四层负载均衡器(IPVS / Katran / Cilium)
- 牛车把云锦拉回一丈宽的前津窄门换票盖章 —— 传统对称式代理 / SNAT,出站大流量被迫回穿负载均衡器造成带宽与状态表瓶颈
- 不改竹筹一字、只套”送七号阁侧门”院内布袋 —— 二层 DSR(仅重写以太网目的 MAC 地址,完整保留客户端源 IP 与目的
VIP) - 十二座水阁齐声抢答三岔河心船老大的问路 —— 未做 ARP 抑制时的 ARP 抢劫 / ARP Flux,后端直接响应
VIP的 ARP 广播导致流量失控 - 锁进内堂密室、对外闭嘴装哑的”哑牌规矩” —— 在后端
lo回环网卡绑定VIP/32,并设arp_ignore=1、arp_announce=2静默物理口 ARP - 官驿石桥扒掉私家布袋、按竹筹把信踢回总署 —— 三层路由器剥离二层 MAC 头并按目的
VIP路由,导致二层 DSR 跨网段形成路由死循环 - 套在竹筹外层的过境”火漆竹筒” —— L3DSR 隧道封装(IP-in-IP / GUE / Geneve),外层按后端
RIP跨三层路由,内层保留原包直回江面
At the Cloud-Ford Brocade Guild beside the Canglang River, what comes in through the front window weighs less than an ounce, and what leaves out the back weighs ten tons.
Silk merchants from downriver arrive in swift skiffs and slide a three-inch bamboo tally through the lattice of the Front Dispatch Gatehouse: Yangzhou Pier Four — two hundred bolts of cloud-brocade. Dispatch Master Shen Kuo needs half a breath to read a tally. Fulfilling it, however, takes twenty camphorwood crates heavy enough to sink a cargo barge five feet into the water.
For twenty years the guild obeyed one iron rule: out-of-province merchants deal only with the Front Gatehouse and trust only crates bearing the grand seal of the Cloud-Ford Brocade Guild.
To keep that rule, every time Shen Kuo accepted a bamboo tally he scraped off the merchant’s pier address, wrote “Return to Shen Kuo, Front Gatehouse,” and sent a runner to one of the twelve riverside weaving houses behind the wall. Once two hundred bolts were woven, ox-carts had to haul all twenty crates back into the ten-foot stone archway of the Front Gatehouse, where Shen Kuo checked his ledger, stamped “Cloud-Ford Brocade Guild” on the wax, rewrote “To Yangzhou Pier Four,” and loaded the waiting river barges at the narrow front dock.
With three weaving houses, the archway held. With twelve, absurdity set in.
Half the looms in the rear weaving houses stood idle while ox-carts locked axles inside the ten-foot stone gatehouse from dawn until midnight. Outside, skiffs handing in bamboo tallies cleared the window in three heartbeats; inside, outbound brocade wagons choked the passage solid. Worst of all, every single weaving house backed directly onto the broad, open Canglang River with its own wide water-gate — yet all twelve left the great river empty so they could jam ten-ton loads back through Shen Kuo’s keyhole.
Chief Mistress Lin Qingyan climbed the gatehouse watchtower, looked down at the snarled ox-carts, and asked Shen Kuo a single question:
“What enters is a three-inch bamboo tally; what leaves is a ten-ton barge. Why must the barge squeeze back through the needle’s eye that took the tally?”
That evening she turned the twenty-year rule inside out.
Starting at dawn, when a merchant’s bamboo tally arrived — carved “From Yangzhou Pier Four, To Cloud-Ford Brocade Guild” — Shen Kuo was forbidden to alter a single stroke on it. He simply picked the least busy weaving house, dropped the untouched tally into a courtyard linen pouch tagged “To Weaving House Seven, Side Door,” and tossed it over the inner wall. Weaving House Seven opened the pouch, read Yangzhou Pier Four straight off the original tally, loaded twenty crates onto a barge at its own rear water-gate, stamped the wax “From Cloud-Ford Brocade Guild,” and poled straight out onto the broad Canglang River toward Yangzhou — never showing a sail at the Front Gatehouse again.
Shen Kuo was delighted. Overnight he had twelve identical brass plaques cast reading Cloud-Ford Brocade Guild and hung one under the eaves of every weaving house — for without the guild’s own name over its door, a workshop clerk seeing a tally addressed To Cloud-Ford Brocade Guild would toss it aside as misdelivered mail, and would have no right to stamp the guild’s seal on outgoing barges.
At first cockcrow the next morning, chaos broke loose.
A newcomer boatman from Huizhou rested his oar at the three-way canal fork outside the port and cupped his hands to shout: “Which door here is the Cloud-Ford Brocade Guild?”
Before Shen Kuo could open his mouth, apprentices at all twelve weaving houses glanced up at the shiny new brass plaques under their eaves, leaned over the wall, and bellowed back at once: “Right here!” “Row to Dock One!” “No, Dock Two!” Knowing no better, the boatman steered straight into whichever workshop shouted loudest. Within half an hour, half the morning’s skiffs were wedged outside Houses One and Two, Houses Three through Twelve sat deserted, and Shen Kuo’s careful balancing ledger at the Front Gatehouse was worthless.
By noon Shen Kuo laid down the Silent Plaque Rule:
Every weaving house took down the Cloud-Ford Brocade Guild plaque from its outer eaves and locked it inside a windowless inner seal-room. Whenever a stranger out at the canal fork shouted “Who here is the Cloud-Ford Brocade Guild?”, all twelve weaving houses kept dead silence — only Shen Kuo at the Front Gatehouse was permitted to answer public calls. Yet the instant Shen Kuo’s courtyard pouch came through a workshop’s side door, the clerks inside saw the brass plaque hanging in their inner room, accepted the tally as addressed to themselves, and stamped outbound river barges with the grand guild seal as before.
The bottleneck vanished overnight. Not a single ox-cart crossed the Front Gatehouse courtyard; Shen Kuo sat fanning himself over feather-light bamboo slips while behind the wall twelve rear water-gates launched heavy barges straight onto the river at ten times the old pace.
Then came autumn, and an imperial tribute order too large for the riverbank. Lin Qingyan crossed the stone ridge ten miles east into Mist-Creek Valley, where eight new weaving houses opened directly onto a deep tributary of the Canglang River. Between the Front Gatehouse and Mist-Creek Valley, however, stood three Imperial Post Bridges staffed by government relay guards.
On opening morning, Shen Kuo slipped a Yangzhou bamboo tally into a courtyard linen pouch tagged “Mist-Creek House Three” and sent a runner up the ridge.
One incense-stick later, Shen Kuo was sipping tea when an imperial bridge courier trotted into the Front Gatehouse and bowed: “Master Shen — mail routed back from Post Bridge One!”
Shen Kuo looked down and nearly dropped his cup. It was the exact Yangzhou bamboo tally he had dispatched twenty minutes earlier. Thinking the runner had blundered, he bagged it afresh and sent it out again; twenty minutes later a sweating bridge courier laid the very same tally back on his desk. All morning long, dozens of tallies spun in a tight loop between the Front Gatehouse and Post Bridge One while eight brand-new weaving houses in Mist-Creek Valley wove not an inch of silk.
Old Inspector Zhao happened past the bridge, took one look, and laughed. “Master Shen, your courtyard linen pouches only mean something inside your own compound! The moment a parcel steps onto an Imperial Post Bridge, bridge regulations say strip off local pouches and route strictly by the addressee carved on the letter itself. And what is carved on that bamboo tally? To Cloud-Ford Brocade Guild! The bridge officer opens his imperial road atlas, sees Cloud-Ford Brocade Guild = Shen Kuo’s Front Gatehouse, and dutifully marches it right back to your desk!”
Shen Kuo froze. Scrape Cloud-Ford Brocade Guild off the tally, and Mist-Creek House Three couldn’t ship directly to the merchant under the guild seal; leave it on, and Post Bridge One kicked every tally straight back up the hill.
Lin Qingyan walked to the bridgehead, turned the bamboo tally over in her fingers, and bought a stack of wax-sealed transit tubes from the relay station.
“Don’t touch a stroke on the bamboo tally, and don’t ask the bridge guards to bend imperial law,” she said. She slid the untouched tally — still carved From Yangzhou Pier Four, To Cloud-Ford Brocade Guild — inside a hollow bamboo transit tube, sealed the cap, and brushed an outer relay address across the cylinder: “From Front Gatehouse — Deliver to Mist-Creek House Three.”
At all three Imperial Post Bridges, guards read only Mist-Creek House Three on the outer tube and waved the rider straight over the ridge. At Mist-Creek House Three, the clerk cracked open the outer transit tube, tossed the shell into the scrap basket, and pulled out the pristine bamboo tally inside — carrying Yangzhou Pier Four’s true return address and matching the silent brass plaque in the inner room. Before sunset, deep-laden brocade barges glided out of the valley creek straight into the Canglang River, bound for Yangzhou without ever looking back.
— By now you’ve probably recognised it: this is Direct Server Return (DSR) and Layer-3 Direct Server Return (L3DSR) in high-throughput Layer-4 load balancing (powering Linux IPVS DR mode, Meta’s Katran, Google’s Maglev, and Cilium DSR). Shen Kuo’s Front Gatehouse is the Layer-4 load balancer; Cloud-Ford Brocade Guild is the public Virtual IP (VIP); the three-inch bamboo tallies and ten-ton barges are tiny request packets and massive response streams; the local courtyard pouch is Layer-2 MAC address rewriting; the brass plaque locked inside a silent inner room is binding VIP/32 to lo (loopback) with ARP suppression; and the outer wax-sealed transit tube that crosses Imperial Post Bridges (Layer-3 routers) is L3DSR tunnel encapsulation (IP-in-IP, GUE, or Geneve).
What it is
Most real-world network traffic — video streaming, object storage downloads, CDN asset delivery, large RPC responses — is wildly asymmetric: inbound client requests are tiny (a few hundred bytes for an HTTP GET), while outbound server responses are orders of magnitude larger.
In traditional symmetric load balancing (a Layer-7 reverse proxy or Layer-4 SNAT / Full-NAT load balancer), both directions must pass through the load balancer: inbound packets have their destination rewritten to a backend’s Real IP (RIP) and their source rewritten to the load balancer, so outbound megabytes must flow back through the load balancer to have their source IP rewritten back to the public VIP. Add ten times more backend servers and the entire fleet still chokes on the load balancer tier’s egress NIC bandwidth, CPU, and connection-tracking (conntrack) memory.
Direct Server Return (DSR) splits the request path from the response path so tiny requests traverse the load balancer while heavy responses travel straight from the backend server to the client:
- Layer-2 DSR (MAC Rewrite): When load balancers and backends share a Layer-2 VLAN, the load balancer receives a packet addressed to
VIP, leaves the Layer-3 IP header completely untouched (src = Client IP,dst = VIP), and rewrites only the destination Ethernet MAC address to the chosen backend’s NIC MAC. - Loopback
VIP+ ARP Suppression: Why doesn’t the backend kernel drop a packet addressed toVIPas foreign, and how can it reply withsrc IP = VIP? Every backend assignsVIP/32to its ownlo(loopback) interface. To prevent the “twelve workshops shouting at once” bug (ARP flux / VIP hijacking) on the shared Layer-2 network, Linux backends setnet.ipv4.conf.all.arp_ignore=1andnet.ipv4.conf.all.arp_announce=2— silencing physical NICs whenever routers broadcastARP Who-Has VIP, so only the load balancer answers publicly while every backend kernel quietly recognizesVIPinternally. - Layer-3 DSR (L3DSR — Tunnel Encapsulation): Modern Spine-Leaf cloud fabrics route Layer-3 IP across racks rather than stretching flat Layer-2 VLANs. The first Layer-3 router strips the Ethernet MAC header, inspects the inner
dst IP = VIP, and routes the packet straight back to the load balancer in a loop. L3DSR (such as IP-in-IP in Meta’s Katran, GUE in Google’s Maglev, or Geneve / TCP-option DSR in Cilium) wraps the untouched client packet inside an outer IP/UDP header addressed to the backend’sRIP. Routers forward across any number of hops to the backend, which strips the outer header, reads the trueClient IPandVIP, and transmits heavy response packets (src = VIP,dst = Client IP) directly onto the network fabric without returning through the load balancer.
Why it matters
DSR and L3DSR decouple ingress dispatch capacity from egress bandwidth: a small pair of Layer-4 load balancers processing a few gigabits of tiny request packets can orchestrate hundreds of gigabits or terabits per second of direct backend egress — while preserving the client’s true source IP natively at Layer 4 without X-Forwarded-For headers or PROXY protocol parsing.
In production, however, three subtle failure modes catch teams off guard when rolling out L3DSR:
- The outer transit tube makes fat parcels too wide for the bridge (MTU & PMTU black holes): Wrapping a client packet in IP-in-IP (+20 bytes) or GUE / Geneve (+28 to 50 bytes) inflates packet size. Tiny
HTTP GETtallies sail through easily, so health checks look green — until a client uploads a full 1500-bytePOSTsegment, which exceeds a 1500-byte underlay MTU after encapsulation and silently stalls mid-stream. Production L3DSR fabrics require underlay jumbo frames, TCP MSS clamping, or rock-solid ICMP Packet-Too-Big handling. - Anti-spoofing guards block your own barges (
rp_filter& cloud source/dest checks): Because packets enter a backend addressed toRIP(outer header) and leave bare withsrc IP = VIP, routing is intentionally asymmetric. Strict Linux reverse-path filtering (rp_filter=1) or cloud VPC Source/Destination Checks will mistake outboundsrc = VIPpackets for IP spoofing and drop everySYN-ACKon the floor unless explicitly configured. - Bounced mail still has to reach the right workshop (ICMP error consistent hashing): When a router along the return path sends
ICMP Fragmentation Neededback towardVIP, that error lands at the load balancer, not the backend. The load balancer must parse the inner quoted TCP 5-tuple inside the ICMP payload and run the exact same consistent hash (e.g., Maglev ring) so the error reaches the specific backend holding that connection.
The architectural lesson reaches well beyond packet headers: deciding where work goes does not require carrying the freight back — let the gatekeeper touch only the three-inch tally, and let the heavy barges take the open river.
Metaphor mapping
- Three-inch bamboo order tallies vs. ten-ton cloud-brocade barges — asymmetric network traffic: tiny inbound request packets (
HTTP GET) vs. massive outbound response streams - “Cloud-Ford Brocade Guild” title and Shen Kuo’s Front Gatehouse — the public Virtual IP (VIP) and the Layer-4 load balancer (IPVS / Katran / Cilium)
- Hauling brocade ox-carts back through the ten-foot gatehouse archway — symmetric reverse proxying / SNAT, forcing all egress bandwidth and connection state back through the load balancer
- Tossing the untouched tally in a local courtyard pouch (“House Seven, Side Door”) — Layer-2 DSR: rewriting only the destination Ethernet MAC while leaving
src = Client IPanddst = VIPintact - All twelve weaving houses shouting back to the boatman at the canal fork — ARP flux / VIP hijacking when backends answer
ARP Who-Has VIPbroadcasts on the shared network - Locking the guild plaque in a windowless inner room (“Silent Plaque Rule”) — binding
VIP/32tolo(loopback) witharp_ignore=1andarp_announce=2 - Imperial Post Bridge stripping the pouch and routing the tally back to Shen Kuo — Layer-3 routers stripping Ethernet MAC headers and routing
dst = VIPback to the load balancer in a loop - The wax-sealed outer transit tube addressed to Mist-Creek House Three — L3DSR tunnel encapsulation (IP-in-IP / GUE / Geneve) routing to backend
RIPwhile preserving directsrc = VIPreturn