Datacenter & Cloud Networking

a leaf-spine topology

Imagine an airport where, instead of one giant central terminal everyone must pass through, you have a row of gate clusters (leaves) and a row of express monorails (spines), wired so that every gate cluster connects to every monorail. To get from any gate to any other gate, you ride exactly one monorail — never more, never less. Every trip between two leaves is the same short length, and there are as many parallel routes as there are monorails. That regular, two-layer mesh is a leaf-spine network.

Concretely, leaf switches are the top-of-rack switches that servers plug into; spine switches form an upper layer; and crucially every leaf connects to every spine, but leaves never connect directly to other leaves and spines never connect to other spines. So a packet from a server on one rack to a server on another always takes the same hop count: leaf, up to some spine, down to the destination leaf — two hops through the fabric. Because each leaf has multiple spines to choose from, there are many equal-cost paths, and ECMP spreads flows across them. To grow capacity you just add more spines; to add servers you add more leaves. This is simply a two-layer (folded) Clos / fat-tree, and it is the dominant modern datacenter design.

Why it matters: leaf-spine gives predictable, uniform latency (every server pair is equidistant) and high bisection bandwidth using small commodity switches, fixing the three-tier model's oversubscribed, variable-latency core. The honest limit is the spine port count: a single leaf-spine layer can only grow so wide before you run out of spine ports, at which point operators stack multiple leaf-spine 'pods' into a larger multi-tier Clos fabric. As with any ECMP fabric, the theoretical non-oversubscribed bandwidth is only realized if traffic is well balanced across the spines.

With 4 spine switches, a server on rack A reaching a server on rack B has 4 equal-cost paths — one through each spine. ECMP hashes the flow to one of them. Whether the source and destination are next to each other or far across the room, the path is always exactly two fabric hops, so latency is uniform.

Every leaf-to-leaf trip is two hops; the spines provide the parallel paths.

Leaf-spine is just a two-layer fat-tree, so its strengths and caveats are the fat-tree's: uniform latency and high bisection bandwidth, but only if ECMP actually balances flows, and only up to the size set by available spine ports before you must add more tiers.

Also called
spine-and-leaftwo-tier Closfolded Clos葉脊拓樸脊葉架構