Matryoshka: Realizing Hyperscale Data Center Network Design for the AI Era

Yan Cai (Meta), Jialong Li (Max Planck Institute for Informatics), Kutalmis Akpinar (Meta), Tianxiang Li (Meta), Hany Morsy (Meta), Jason Wilson (Meta), Sunil Khaunte (Meta), Yiting Xia (Max Planck Institute for Informatics), Ying Zhang (Meta)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 3 · Neurons Meet Routers

Overview

This talk details Matryoshka, Meta’s production system designed to automate and scale data center network configuration. Presented at USENIX NSDI, the authors address a critical gap in modern networking infrastructure: translating high-level network design intents into concrete, vendor-specific switch configurations across hyperscale environments. Named after nesting dolls, Matryoshka unwraps network designs layer by layer—from abstract graph-based topologies down to raw port-level configurations—handling nearly 900 data center networks globally.

Watch on YouTube · Slides

Visual summary for Matryoshka: Realizing Hyperscale Data Center Network Design for the AI Era by Yan Cai, Jialong Li, Kutalmis Akpinar, Tianxiang Li, Hany Morsy, Jason Wilson, Sunil Khaunte, Yiting Xia, Ying Zhang
Visual summary for Matryoshka: Realizing Hyperscale Data Center Network Design for the AI Era by Yan Cai, Jialong Li, Kutalmis Akpinar, Tianxiang Li, Hany Morsy, Jason Wilson, Sunil Khaunte, Yiting Xia, Ying Zhang

Key moments

  1. 0:00 Introduction and motivation for Matryoshka network design system
  2. 1:44 Meta's data center network footprint and AI evolution
  3. 3:02 Three core challenges: hyperscale, rapid evolution, and heterogeneity
  4. 4:43 Core principles and three-layer architecture of Matryoshka
  5. 9:18 Ultimate stress test: 100K GPU AI supercluster deployment
  6. 10:33 Performance results across correctness, efficiency, scalability, and stability
  7. 12:35 Key lessons learned from six years of production operation
  8. 14:14 Conclusion and takeaways for the AI era

Matryoshka: Realizing Hyperscale Data Center Network Design for the AI Era

Speakers: Yan Cai (Meta); Jialong Li (Max Planck Institute for Informatics); Kutalmis Akpinar (Meta); Tianxiang Li (Meta); Hany Morsy (Meta); Jason Wilson (Meta); Sunil Khaunte (Meta); Yiting Xia (Max Planck Institute for Informatics); Ying Zhang (Meta)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=e8St497tql8

Overview

This talk details Matryoshka, Meta’s production system designed to automate and scale data center network configuration. Presented at USENIX NSDI, the authors address a critical gap in modern networking infrastructure: translating high-level network design intents into concrete, vendor-specific switch configurations across hyperscale environments. Named after nesting dolls, Matryoshka unwraps network designs layer by layer—from abstract graph-based topologies down to raw port-level configurations—handling nearly 900 data center networks globally.

The system has been in production for over six years, managing 18 distinct data center designs, including Meta’s massive 100,000-GPU AI superclusters. As large language model (LLM) training workloads demand unprecedented cluster sizes, heterogeneous hardware, and rapid deployment cycles, traditional ad-hoc scripting falls short. Matryoshka frames network configuration realization as a rigorous systems engineering problem, utilizing a stateless, modular compilation architecture that guarantees consistency across greenfield deployments and brownfield migrations alike.

Background

▶ Watch: Introduction and motivation for Matryoshka network design system (0:00)

In the machine learning and systems space, academic research traditionally concentrates on network topology design (such as fat-tree or leaf-spine layouts) or post-deployment monitoring and management. Meanwhile, industry practice has historically relied on scattered, ad-hoc scripting workflows to bridge the gap between a logical architecture and the physical infrastructure. In smaller deployments, scripts suffice; at Meta's scale, they become a critical bottleneck.

This operational friction has intensified dramatically in the AI era. Modern AI training clusters scale faster than traditional cloud workloads, pushing infrastructure limits with gigawatt-level power requirements and multi-tier backend fabrics. Over a six-year period, Meta introduced more than 16 data center designs and over 30 new device roles. Operating across this dynamic landscape requires managing continuous upgrades—such as transceiver speed increases and platform transitions—while accommodating hardware heterogeneity ranging from successive generations of Nvidia GPUs to Meta's in-house MTIA (Meta Training and Inference Accelerator) accelerators, external vendor switches, and the in-house Fboss (Facebook Switch Software) network operating system.

Key Findings

▶ Watch: Three core challenges: hyperscale, rapid evolution, and heterogeneity (3:02)

Matryoshka successfully bridges the gap between high-level architectural intent and physical network execution. Key operational and performance metrics from six years of production use include:

  • Universal Coverage: 100% of Meta’s data center infrastructure—spanning nearly 900 networks across 18 designs—is configured and managed via Matryoshka.
  • First-Attempt Correctness: 95.4% of Matryoshka-generated configurations pass switch-level verification on the first attempt, with daily end-to-end build success rates reaching 96.4%.
  • Massive Scale: The system successfully orchestrates the 100K GPU AI supercluster, powering foundational LLM training workloads across six interconnected buildings that combine brownfield migrations and greenfield expansions.
  • Database Transaction Acceleration: By introducing an incremental state-difference algorithm for backend database updates, Matryoshka reduced transaction times in the AppNet network modeling database by 70% to 99%.
  • Linear Scalability: Processing time grows strictly linearly with network switch count, scaling predictably as cluster topologies expand.

Technical Deep Dive

▶ Watch: Ultimate stress test: 100K GPU AI supercluster deployment (9:18)

Matryoshka is structured around three core architectural layers and five guiding design principles.

The Three-Layer Architecture

  1. Intent Specification: The innermost layer utilizes Thrift-based declarative network specifications. Engineers declare the desired state—including topology type, addressing schemes, routing policies, and target hardware platforms—which are version-controlled and validated prior to compilation.
  2. Intent Realization Pipeline: The middle layer processes specifications through sequential compilation stages:
  • Switch Entities: Identifies hostnames, device roles, and hardware platforms.
  • Topology Decomposition: Breaks networks down into graph-like primitives and composes them.
  • IP Addressing: Performs hierarchical subnet allocation down to individual port assignments.
  • Routing: Configures BGP (Border Gateway Protocol) sessions, peer groups, and routing policies.
  1. Switch Configuration: The outermost layer generates a JSC (Generic Switch Configuration), an intermediate vendor-independent representation of the entire network configuration. Dedicated vendor converters then translate the JSC into specific vendor operating system formats.

Design Principles

  • Graph-Based Composition: All data center topologies are built by combining four fundamental graph primitives: Complete Bipartite, Ring, Mesh, and Circulant Bipartite.
  • Stateless Compilation: Matryoshka recompiles every network configuration completely from scratch on every run. Brownfield upgrades utilize the exact same code path as greenfield deployments, eliminating state drift and configuration bugs.
  • Generic Database Updates: Rather than dropping and recreating entire networks in the AppNet database, Matryoshka computes incremental differences between current and desired states.

Experimental Setup & Results

▶ Watch: Performance results across correctness, efficiency, scalability, and stability (10:33)

Operating in a live hyperscale production environment rather than a benchmark sandbox, Matryoshka's evaluation focuses on real-world correctness, compilation efficiency, and stability across Meta's global infrastructure.

  • Datasets & Topologies: Evaluated across 18 distinct data center designs, encompassing traditional front-end fabric architectures, 16-plane aggregated fabrics, and disaggregated AI back-end topologies like non-scheduled and distributed scheduled fabrics.
  • Scale: Tested continuously against execution volumes of 800 to 2,000 configuration changes weekly across 900 networks, culminating in the stress test of the 100K-GPU AI supercluster.
  • Correctness & Validation: Validation checks occur at every stage. Inputs are checked via spec validation, and outputs are verified against the JSC validation service before hitting production hardware. This gating prevents invalid configurations from deploying, ensuring high first-try success rates (95.4%).
  • Performance Characteristics: Compiled primarily in Python, processing time scales linearly with network switch size. Because switch configuration generation dominates runtime, optimizing the stateless compilation pipeline has kept New Product Introduction (NPI) cycles efficient, with ongoing efforts targeting a reduction in the NPI cycle from one quarter to one month.

Practical Implications

▶ Watch: Conclusion and takeaways for the AI era (14:14)

For infrastructure teams, ML platform engineers, and network architects operating large-scale AI clusters, Matryoshka offers several critical lessons:

  • Treat Network Configuration as a Systems Problem: Ad-hoc scripts fail under the velocity and scale of modern AI hardware deployments. Automated, model-driven compilation is mandatory for managing hyperscale clusters.
  • Statelessness Prevents Drift: Recompiling from scratch eliminates the accumulation of silent state drift between database records and physical switch states, dramatically simplifying debugging.
  • Beware the Blast Radius: At hyperscale, a single software bug can impact thousands of devices. For example, an early bug during a brownfield migration accidentally purged IPv6 prefixes across an entire region. This risk mandates rigorous object invariant validation, automated regression testing across all supported design templates, and pre-deployment validation gates.
  • Abstraction Isolates Heterogeneity: Using an intermediate vendor-independent format (JSC) protects infrastructure pipelines from the churn of multi-vendor hardware migrations and proprietary operating system differences.

Key Takeaways

  • First-Class Systems Problem: Hyperscale data center network configuration requires rigorous systems-level design, not scripting afterthoughts.
  • Modular & Stateless Scalability: Stateless compilation using modular graph primitives scales reliably across years of architectural evolution without requiring core system rewrites.
  • Essential for the AI Era: The extreme scale, rapid hardware iteration, and hardware heterogeneity of modern AI clusters make manual or ad-hoc configuration untenable.
  • Rigorous Validation Gates: Continuous validation at every pipeline stage—from high-level declarative specs to intermediate generic configs—is critical to preventing catastrophic blast radii.

About the Speaker(s)

The talk represents contributions from a large engineering and research collective at Meta and the Max Planck Institute for Informatics, led by authors including Yan Cai, Jialong Li, Kutalmis Akpinar, Tianxiang Li, Hany Morsy, Jason Wilson, Sunil Khaunte, Yiting Xia, and Ying Zhang. The speakers bring extensive production engineering experience in building Meta's global data center networks, managing large-scale network automation, and scaling infrastructure to support next-generation AI workloads.

Reviews

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)