AI network fabric · interactive project

Clos ECMP Fabric Visualizer

A live leaf-spine fabric simulation — as a 2D schematic or a full 3D ops console, driven by the same state machine. Select two hosts, watch traffic hash across every equal-cost spine path, then kill a link and see the fabric reconverge onto the surviving spines.

4Spines
6Leaves
12Hosts
24Fabric links
Live simulation

The fabric, under failure

Follow the four steps below in either view — the 2D schematic for clarity, or the 3D console for the full picture (drag to orbit, scroll to zoom, particles show live traffic). Cinematic mode runs the whole demo hands-free.

  1. STEP 1Select sourceClick any host
  2. STEP 2Select destinationClick a second host
  3. STEP 3Fail a linkClick a fabric link, or use the button
  4. STEP 4Watch reconvergenceTraffic shifts to surviving spines
Select a source host to begin IDLE
SPINE LEAF HOST
active ECMP path failed link idle fabric link selected host
loading 3D engine…
active path failed link idle link live traffic drag = orbit · scroll/pinch = zoom · click hosts & links
* Simulated control plane. Real fabrics see ms-scale loss bounded by BFD detection and BGP withdraw/FIB-program timing — the model shows steady-state behavior, not the loss window.
Why this matters

AI traffic breaks classic network assumptions

Training clusters don't generate polite client-server flows. They generate synchronized, full-bandwidth, east-west bursts — and the job moves at the speed of its slowest path.

collective traffic

Every GPU talks at once

Collectives like AllReduce and AllGather fire across thousands of GPUs simultaneously. One congested or failed path stalls the entire training step — the network is inside the compute loop, not next to it.

path diversity

ECMP spreads the load

Equal-cost multi-path hashing distributes flows across every spine. Predictable, uniform bandwidth between any two endpoints — no tuning per flow, no manual traffic engineering.

failure locality

Blast radius: one link

When a link dies, only the local leaf reroutes onto surviving spines. No fabric-wide reconvergence, no topology recalculation storm. The workload keeps moving.

This combination — uniform bandwidth, massive path diversity, localized failure recovery — is why every hyperscale GPU cluster, whether InfiniBand or RoCEv2 Ethernet, is built on some variant of the Clos design. Understanding how traffic actually distributes and reconverges isn't academic: hash polarization, elephant flows defeating ECMP, and reconvergence timing are exactly the failure modes that separate a fabric that trains models from one that wastes GPU-hours.
Topology & architecture

What's modeled, and how honestly

Topology3-stage Clos — 4 spines × 6 leaves × 12 hosts. Every leaf connects to every spine (24 fabric links); hosts dual-homed logically to their leaf.
Oversubscription2 host ports : 4 fabric uplinks per leaf — non-blocking with headroom. Real AI fabrics target 1:1 for the backend/compute network.
Routing modeleBGP-style behavior: each switch is its own ASN, routes advertised up/down the fabric. Path selection reduces to a spine filter — ecmpPaths() below is the whole "protocol."
Load sharingPer-flow 5-tuple ECMP hashing. A single flow stays pinned to one path (no reordering); the aggregate distributes across all equal-cost spines.
Failure modelSingle link failure → local withdraw → FIB reprogram on the affected leaf → traffic redistributes across surviving spines. Sequenced at realistic control-plane ordering.
RenderingOne state machine, two renderers: a 2D SVG schematic and a 3D WebGL console (Three.js, lazy-loaded on demand). All pulse animation is driven from a single clock, so the fabric breathes in sync by construction.
Simulated vs. realSimulated: BGP timers, the packet-loss window, buffer behavior, ECN/PFC. Real: the topology math, path computation, hash distribution logic, and reconvergence sequencing. Model boundaries are stated, not implied.
fabric.js — path computationECMP core
// Clos symmetry makes routing trivial — that's the design win.
// No Dijkstra, no graph library: reconvergence is a spine filter.
function ecmpPaths(src, dst) {
  const sl = leafOf(src), dl = leafOf(dst);
  if (sl === dl) return [[src, sl, dst]];        // intra-leaf
  return SPINES
    .filter(s => up(`${sl}-${s}`) && up(`${dl}-${s}`))
    .map(s => [src, sl, s, dl, dst]);
}
Technologies

Built deliberately simple

One HTML file, one state machine, two renderers. The 2D schematic runs on zero dependencies; the 3D console lazy-loads Three.js only when you ask for it. The concepts carry the weight — the code stays out of the way.

Implementation

Vanilla JS state machine SVG rendering (2D) Three.js WebGL (3D, lazy-loaded) Particle traffic simulation Single-file deploy GitHub → Vercel CI/CD

Concepts modeled

Clos / leaf-spine ECMP · 5-tuple hashing BGP withdraw / FIB reprogram Failure domains Oversubscription ratios Reconvergence sequencing
Learning & certification alignment

From enterprise routing to AI fabrics

Fifteen years of enterprise WAN/DC networking (CCNP — BGP, MPLS, Cisco, F5, Palo Alto), now deliberately deepened into the fabric layer that AI infrastructure runs on.

in progress

AI Infrastructure Networking specialization

  • RoCEv2 / RDMA transport over converged Ethernet
  • Lossless fabric mechanics — PFC, ECN, DCQCN
  • GPU cluster network design & rail-optimized topologies
  • NCCL collectives and their traffic patterns on the wire
  • NVIDIA Academy networking coursework
foundation

Enterprise infrastructure depth

  • CCNP · BGP / OSPF / MPLS at production scale
  • Data-center switching — Cisco Nexus / Catalyst
  • Load balancing & app delivery — F5 BIG-IP LTM
  • Security — Palo Alto NGFW operations
  • Automation — Python, Ansible, REST APIs
Project value

What this project demonstrates

/01

Fabric behavior, not fabric vocabulary

Anyone can define ECMP. This shows how traffic actually distributes, what a link failure looks like from the control plane's perspective, and why reconvergence stays local in a Clos design.

/02

Stated model boundaries

The simulation is explicit about what's real (topology math, path logic, sequencing) and what's simplified (timers, loss windows, buffer behavior). Knowing the boundary between model and wire is the operational skill.

/03

Engineering restraint

The 2D core is one file with no framework and no dependencies; the 3D console loads its engine only on demand. The topology's symmetry makes the routing trivial — recognizing that, instead of importing a graph library, is the point.