Data Center Leaf-Spine Topology Diagram

Modern data centers replace the old core/aggregation/access tree with a leaf-spine fabric, a three-stage Clos network. This topology diagram shows a small fabric of four spines and six leaves, how traffic spreads over equal-cost paths, and what happens when a spine fails.


1. The Diagram

Data Center Leaf-Spine Fabric (3-stage Clos) Spine 1 AS 65000, 32 x 100G Spine 2 AS 65000, 32 x 100G Spine 3 AS 65000, 32 x 100G Spine 4 AS 65000, 32 x 100G Border Leaf 1 to WAN / firewall Border Leaf 2 to WAN / firewall Leaf 1 (ToR) AS 65101 Leaf 2 (ToR) AS 65102 Leaf 3 (ToR) AS 65103 Leaf 4 (ToR) AS 65104 WAN Routers + Firewalls external routes via eBGP Rack 1 40 servers, 25G Rack 2 40 servers, 25G Rack 3 40 servers, 25G Rack 4 40 servers, 25G Every leaf links to every spine. Leaf 1 to Leaf 4 = leaf - spine - leaf, always 3 hops. Yellow: Leaf 1 hashes flows across 4 equal-cost paths (ECMP), 4 x 100G of uplink. eBGP underlay on every leaf-spine link (RFC 7938), VXLAN/EVPN overlay for tenants.
  1. Spines. Four spine switches form the backbone. They connect only to leaves, never to each other or to servers.
  2. Leaves (top of rack). Each rack has a leaf switch that connects its servers and has one uplink to every spine. That full mesh between the two layers is the defining rule.
  3. Border leaves. Two leaves (green) connect the fabric to WAN routers and firewalls. External routes enter here, so north-south traffic is kept off the server leaves.
  4. Routing. Each leaf runs eBGP to each spine with its own private AS number. Because every spine path has the same cost, the leaf uses ECMP to hash flows across all four (yellow lines from Leaf 1).
  5. Predictable latency. Any two servers in different racks are exactly leaf-spine-leaf apart. To grow, add leaves; to add bandwidth, add spines.

2. How to Read It

How to Read a Network Topology Diagram Device router / switch / host labelled box per device physical / L2 link solid line = cable or port uplink / trunk yellow = emphasis dashed boundary groups devices allowed traffic blocked / failure arrows only show flows zone / VLAN / subnet

In fabric diagrams the line count matters: leaves times spines links. Highlight one leaf's uplinks to show ECMP, and colour border leaves differently because their role differs even though their wiring is identical.

Also write the oversubscription ratio somewhere on the page. With 40 servers at 25G per rack (1,000G down) and 4 x 100G up, each leaf is 2.5:1 oversubscribed, which is a typical figure for general compute; AI training fabrics aim for 1:1.

3. Variant: Spine Failure

Variant: Spine 2 Fails Spine 1 up Spine 2 DOWN Spine 3 up Spine 4 up Leaf 1 3 of 4 uplinks Leaf 2 3 of 4 uplinks Leaf 3 3 of 4 uplinks Leaf 4 3 of 4 uplinks BGP withdraws routes via Spine 2 in under a second (BFD); ECMP rehashes over 3 paths. Nothing is partitioned; each leaf keeps 75% of its uplink bandwidth.

When one spine dies, BFD detects it and BGP withdraws the routes through it. Leaves rehash over the three survivors, losing a quarter of uplink capacity but no reachability. The same view helps size the fabric: with N spines one failure costs 1/N of capacity.

4. Pros, Cons, and When to Use

Pros

Cons

When to use

When not to use

5. As Diagrams-as-Code

D2 (Terrastruct's diagram language):

direction: down
spines: {
  s1: Spine 1; s2: Spine 2; s3: Spine 3; s4: Spine 4
}
leaves: {
  bl1: Border Leaf 1; bl2: Border Leaf 2
  l1: Leaf 1; l2: Leaf 2; l3: Leaf 3; l4: Leaf 4
}
# full mesh: every leaf to every spine
leaves.bl1 -- spines.s1; leaves.bl1 -- spines.s2; leaves.bl1 -- spines.s3; leaves.bl1 -- spines.s4
leaves.bl2 -- spines.s1; leaves.bl2 -- spines.s2; leaves.bl2 -- spines.s3; leaves.bl2 -- spines.s4
leaves.l1 -- spines.s1: {style.stroke: gold}
leaves.l1 -- spines.s2: {style.stroke: gold}
leaves.l1 -- spines.s3: {style.stroke: gold}
leaves.l1 -- spines.s4: {style.stroke: gold}
# ... repeat for l2, l3, l4
wan: WAN Routers + Firewalls
leaves.bl1 -- wan; leaves.bl2 -- wan