AI & GPU Compute

Network Fabric Design for GPU Clusters: Spine-Leaf, RDMA & Rail-Optimized Topologies

A GPU cluster is only as fast as its slowest communication link. A single misconfigured switch, an undersized spine tier, or a naive all-to-all topology can turn a $10 million training cluster into a system that spends more time waiting for data transfers than computing gradients. Network fabric design is the discipline that prevents this — and it is fundamentally different from designing networks for web applications or enterprise IT.

This guide covers the network architecture decisions specific to GPU clusters: choosing between InfiniBand and Ethernet with RDMA, designing spine-leaf fabrics for GPU traffic patterns, implementing rail-optimized topologies for multi-GPU nodes, and tuning the stack for NCCL collective operations. Whether you are building a cluster from scratch or evaluating a GPU colocation provider's network capabilities, this is the reference.

Why GPU Cluster Networks Are Different

Traditional data center networks are designed for north-south traffic: clients talking to servers. GPU cluster networks are dominated by east-west traffic: GPUs talking to other GPUs. The differences are fundamental:

  • All-reduce dominates: Distributed training uses collective operations (all-reduce, all-gather, reduce-scatter) where every GPU must exchange gradient data with every other GPU after each training step. This is not request-response — it is synchronized bulk transfer across the entire cluster simultaneously.
  • Latency kills throughput: Each training step cannot begin until the previous step's gradient synchronization completes. Even microseconds of network latency, multiplied by millions of training steps, translate to hours of wasted GPU time. RDMA (Remote Direct Memory Access) eliminates kernel-level processing to achieve sub-microsecond latencies.
  • Congestion is catastrophic: A single congested link during an all-reduce operation stalls every GPU in the job. Unlike web traffic where individual slow connections degrade gracefully, GPU collective operations are globally synchronized — the slowest link determines the speed of the entire cluster.
  • Bandwidth must be non-blocking: Every GPU must be able to communicate with every other GPU at full line rate simultaneously. This requires full bisection bandwidth in the fabric — the total bandwidth available when half the cluster talks to the other half.

InfiniBand vs. RoCEv2: Choosing the Interconnect

Factor InfiniBand (NDR/XDR) RoCEv2 (RDMA over Ethernet)
Speed per port400 Gbps (NDR), 800 Gbps (XDR)100/200/400 GbE
Latency<1 μs (hardware RDMA)1-3 μs (depends on switch config)
Lossless behaviorNative (credit-based flow control)Requires PFC + ECN configuration
Collective accelerationSHARP (in-network reduction)Not available
Cost per portHigher ($800-$1,500)Lower ($300-$800)
Operations complexitySpecialized IB expertise neededFamiliar Ethernet operations
EcosystemNVIDIA-centric (ConnectX, Quantum)Multi-vendor (Arista, Cisco, Broadcom)
Best for64+ GPU training, LLM scaleInference, smaller training, mixed use

InfiniBand: The Performance Default

InfiniBand provides hardware-level RDMA with credit-based flow control that guarantees lossless delivery without any switch configuration. NVIDIA's SHARP (Scalable Hierarchical Aggregation and Reduction Protocol) performs all-reduce operations partially inside the network switches themselves, reducing the data volume that traverses the fabric by up to 2x. For large-scale training on H100/H200 or Blackwell platforms, InfiniBand is the reference architecture.

RoCEv2: The Ethernet Alternative

RoCEv2 enables RDMA over standard Ethernet switches by adding an InfiniBand transport header over UDP. It requires Priority Flow Control (PFC) to prevent packet drops and Explicit Congestion Notification (ECN) to manage congestion. When configured correctly, RoCEv2 achieves 80-90% of InfiniBand performance at 50-60% of the cost. The risk is misconfiguration: PFC storms (where pause frames cascade through the fabric) can bring down the entire network. Operators choosing RoCEv2 must invest in testing, monitoring, and switch automation to maintain lossless behavior.

Spine-Leaf Architecture for GPU Fabrics

The spine-leaf topology is the standard for GPU cluster networks because it provides predictable, equal-cost paths between any two endpoints:

  • Leaf switches connect directly to GPU server NICs (typically one leaf per rack or per half-rack). Each leaf uplinks to every spine switch.
  • Spine switches interconnect all leaf switches. They carry only transit traffic — no servers connect directly to spines.
  • Full bisection bandwidth is achieved when the aggregate spine uplink bandwidth from each leaf equals the total server-facing bandwidth on that leaf.

For a 128-GPU cluster with 8-GPU servers (16 servers), a minimal non-blocking fabric might use 4 leaf switches (4 servers each) with 8 spine switches. Each leaf connects to all 8 spines at 400 Gbps, providing 3.2 Tbps of cross-sectional bandwidth per leaf — matching the 3.2 Tbps of server-facing ports (8 GPUs × 400 Gbps each).

Oversubscription Considerations

Full non-blocking fabrics are expensive. Some operators accept 2:1 or 3:1 oversubscription at the spine tier to reduce switch count and cost. This is viable for inference workloads (which have bursty, asymmetric traffic) but dangerous for training workloads (which have sustained, symmetric all-reduce traffic). At 2:1 oversubscription, a large all-reduce operation will saturate the spine tier and introduce queuing delays that reduce GPU utilization. For training clusters, 1:1 (non-blocking) is the strong recommendation.

Rail-Optimized Topology

Rail optimization is the most impactful fabric design pattern for multi-GPU server clusters. Instead of treating each server as a single network endpoint, it treats each GPU position within a server as an independent rail:

  • In an 8-GPU server, GPU 0 connects to Rail 0 leaf switches, GPU 1 to Rail 1, and so on through GPU 7 to Rail 7.
  • Each rail has its own independent spine-leaf plane. The 8 rails never share switch hardware.
  • During all-reduce, each rail carries exactly one-eighth of the total gradient traffic. No single switch sees more than its share.

This design eliminates the hotspot problem that occurs when all 8 GPU links from a server converge on a single leaf switch. It is the standard design for NVIDIA DGX SuperPOD and is supported natively by NCCL's hierarchical ring all-reduce algorithm.

Scaling: A rail-optimized fabric with 8 rails, 4 leaf switches per rail, and 8 spine switches per rail supports up to 128 servers (1,024 GPUs) with full bisection bandwidth and only 96 switches total (8 × 4 leaf + 8 × 8 spine). Traditional single-plane fabrics would need significantly more switches to achieve the same bisection bandwidth.

NCCL Tuning for Fabric Performance

NCCL (NVIDIA Collective Communications Library) is the software layer that maps collective operations onto the physical network. Fabric design and NCCL configuration must be aligned:

  • NCCL_TOPO_FILE: Provide NCCL with an accurate topology file describing the GPU-to-NIC-to-switch mapping. This allows NCCL to choose optimal communication paths and avoid crossing NVLink/PCIe domain boundaries unnecessarily.
  • NCCL_NET_GDR: Enable GPU Direct RDMA (GDR) so that GPU memory is accessed directly by the NIC without staging through CPU memory. This reduces all-reduce latency by eliminating a memory copy.
  • NCCL_ALGO: For rail-optimized topologies, the ring algorithm typically outperforms tree algorithms because it distributes traffic evenly across rails. For fat-tree (traditional spine-leaf) topologies, tree algorithms may be faster for large message sizes.
  • NCCL_CROSS_NIC: In rail-optimized setups, setting this to 0 prevents NCCL from sending traffic across rails, ensuring each rail carries only its designated slice of the collective operation.

Misaligned NCCL configuration is the most common cause of unexpectedly poor training throughput on correctly designed fabrics. Always benchmark with NCCL-tests (nccl-tests on GitHub) before running production training jobs to verify that actual bandwidth matches theoretical fabric capacity.

Storage Network Considerations

GPU clusters need a separate storage network for dataset access and checkpoint writes. Mixing GPU-to-GPU training traffic and storage I/O on the same fabric creates congestion that degrades both:

  • Dedicated storage fabric: Use a separate spine-leaf network (typically 100GbE or 200GbE) for NFS, Lustre, or GPFS traffic. This is lower bandwidth but must be reliable and low-latency for checkpoint writes.
  • Out-of-band management: A third network (1GbE or 10GbE) handles IPMI/BMC management, monitoring, and Kubernetes control plane traffic. This must be isolated from both training and storage traffic.

Related Articles

GPU Clusters with Purpose-Built Network Fabric

Rax GPU colocation includes non-blocking InfiniBand and Ethernet fabrics designed for distributed training at scale. From 8-GPU pods to multi-rack SuperPOD deployments.

Request a Quote