Bookmarks

Leaf-spine topology

A data centre network design of two switch tiers: each access switch is connected to every aggregation switch.

Also: spine-leaf, leaf-spine topology, leaf and spine network

checked 9 Nov

All terms

A two-tier data centre network design: servers connect to access switches (leaves), and every leaf is linked to every aggregation switch (spine). Between any two racks, a path crosses the same number of switches, so latency is predictable, and the network grows by adding identical devices rather than replacing equipment with more powerful ones.

How it is arranged

A leaf is an access switch where the rack’s servers converge; usually it is the ToR switch. A spine is an aggregation switch: it interconnects the leaves, and in a two-tier design the spines are not connected to each other. Every leaf is connected to every spine, so traffic between two leaves passes through exactly one spine. The tiers are joined by routing — such a fabric is called a layer 3 fabric, or routed fabric.

ElementRole
Leafaccess switch: the rack’s servers; some leaves also face outwards with firewalls, load balancers and the internet (exit-leaf)
Spineaggregation switch: connects only to leaves; the tier is built from three or more devices
Leaf-spine linka routed link; between two leaves there are as many such equal-cost paths as there are spines

ECMP and oversubscription

Every leaf has equal-cost paths — one through each spine — and ECMP spreads traffic across them. Bandwidth between the tiers grows by adding spines, and the number of leaves by adding access switches: the design scales horizontally.

The ratio of bandwidth to servers, and of bandwidth to spines, is called oversubscription. The design is non-blocking if a leaf has at least as many uplinks as ports towards the servers (M ≥ N); otherwise it is oversubscribed N/M times. Example: a leaf has 48 servers at 25 Gbit/s attached — 1200 Gbit/s downwards — and 4 links at 100 Gbit/s to the spines, 400 Gbit/s upwards; oversubscription 3:1.

Where the design comes from and where it is used

Leaf-spine is a two-tier variant of a Clos network; the same arrangement is sometimes called a fat tree. The Clos network was described by Charles Clos in 1953, and in data centres it displaced the three-tier access–aggregation–core tree once server-to-server traffic (east–west) grew. Routing in such a network of identical switches is most often built on BGP.

On top of the fabric, an overlay for virtual machines and containers is often deployed — VXLAN controlled through BGP EVPN; in AI clusters the same design carries RDMA traffic over Ethernet (RoCE). In larger networks, leaves are added within pods, and a third tier of super-spines joins the spines of those pods.

  • predictable latency: the same number of hops between any two servers
  • growth without replacing switches with more powerful ones — by adding leaves and spines
  • all paths are active: no need for the spanning tree protocol with its blocked links
  • the failure of one spine reduces bandwidth but does not break connectivity

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • ToRToR switch

    ToR is a switch’s position in the rack, while leaf is its role in the topology: in leaf-spine, the leaf role is usually taken by the ToR switch.

  • VXLANVXLAN

    VXLAN is not a topology but L2 tunnelling over L3; leaf-spine describes the physical network on top of which VXLAN is often built.

In depth in the references

where the topic is covered in detail