Leaf-Spine vs Three-Tier: Choosing a Data Center Design - 夜莺博客

Leaf-Spine vs Three-Tier: Choosing a Data Center Design

The three-tier core-aggregation-access model was built for a world where most traffic entered and left the data center. That assumption broke: more than 70 percent of traffic today moves server to server, and a packet crossing three tiers of switches to reach a server two racks away accumulates latency, buffer pressure and drop risk at every hop. Spine-leaf (a two-tier folded Clos) exists to make every east-west path exactly two hops. This article compares the two honestly, including where three-tier still wins.

What each topology actually is

Three-tier stacks three device roles: the core (L3 routers separating pods), the aggregation layer (L2/L3 switches forming pod boundaries, often running VSS/vPC/MLAG for redundancy) and the access layer (L2 switches to servers). Traffic from one pod to another must traverse access → aggregation → core → aggregation → access, and each pod is isolated from the others' failures.

Spine-leaf flattens this to two roles: leaf switches connect servers, storage, WAN and internet devices, and every leaf connects to every spine. Leaves never connect to leaves and spines never connect to spines. Underlay routing is normally BGP or OSPF with ECMP; L2 variants use TRILL, SPB or an EVPN overlay.

Side-by-side comparison

Dimension Three-tier Spine-leaf
East-west hops 3-5+ depending on pod placement Always 2
Latency predictability Varies with pod and path Deterministic — equal hop count for all flows
STP dependency Yes, with blocked links None where routed or fabric-based; all uplinks active
Bandwidth use STP blocks redundant links Active-active, ECMP spreads flow
Scaling method Add a pod, then re-balance Add leaves for server ports, add spines for bandwidth
Cabling and optics Fewer inter-switch links Full mesh: every leaf to every spine
Blast radius Easily limited to one pod Spine failure degrades bandwidth for all leaves
Change cost Server moves can require re-addressing Server placement is topology-independent

The concrete advantages of spine-leaf

  • Latency: a maximum of two hops for any east-west flow, with equal-distance paths, so a flow's behaviour is predictable without topology knowledge.
  • No spanning tree in the path: routed underlays use ECMP and every uplink carries traffic; STP loops and blocked links disappear as a failure class.
  • Performance: traffic uses the least-congested high-speed link rather than whatever STP left forwarding.
  • Scalability: leaf count sets server port capacity, spine count sets uplink bandwidth. Oversubscription is a dial, not a redesign.
  • Adaptability: identical leaf switch configuration everywhere, so a server can be cabled into any leaf without per-rack VLAN or addressing surgery — exactly what virtualisation and workload mobility require.

The real costs

Spine-leaf is not free. The full mesh multiplies cabling and optics: every leaf needs an uplink to every spine, and the spine must be high port-density, which pushes cost into the spine layer. The number of leaves is capped by spine port density, and the number of spines by leaf uplink port count. A common rule is no worse than roughly 5:1 server-facing oversubscription between leaf and spine, though this is environment-specific, and spine-to-core oversubscription can be far higher because that path carries mostly north-south traffic. Planning the physical layout before buying hardware is mandatory.

Three-tier also keeps real advantages that spine-leaf advocates gloss over: pod isolation limits blast radius, a failure inside a pod is straightforward to reason about, and traffic within a pod is contained so oversubscription can be tuned per pod. For centres dominated by north-south traffic with strong tenant or business-unit separation, three-tier can still be the right answer.

Sizing arithmetic worth memorising

max leaves  = (ports per spine × number of spines) / uplink ports per leaf
max servers = downlink ports per leaf × number of leaves
oversubscription = (downlink bandwidth per leaf) / (uplink bandwidth per leaf)

Run these before the bill of materials, not after. A node with 48 downlinks per leaf, 16 leaves and 6 uplink ports works only if the spine has at least 96 usable ports — and the oversubscription figure tells you whether you have bought a 3:1 fabric or accidentally a 20:1 one when you intended 5:1.

Migration note

Moving from three-tier to spine-leaf usually means re-cabling and re-addressing, and the layer-2 domain has to be extended through an overlay (EVPN/VXLAN) or replaced by routed host addressing. Where a vendor fabric controller (ACI, NSX, or a switch-vendor EVPN automation stack) is available, it takes over address and policy propagation, which is the part that makes a large flat fabric manageable. Treat the fabric controller as part of the topology decision, not an afterthought.

For the oversubscription and ECMP design detail see leaf-spine vs three-tier oversubscription and ECMP design, and for the optical layer that a full mesh demands see MPO/MTP fibre polarity and loss budget.

原文链接:https://www.wwt.com/article/comparing-two-tier-three-tier-data-center-networks