AI Infra Interviews logo
← Networking, Interconnects & Storage / 07
hardCrusoeLambdaMicrosoft

Design the fabric for 4,096 GPUs with 64-port switches. What does 1:1 cost, and what does 2:1 give up?

Count endpoint, leaf, aggregation and core ports for an explicit 4,096-GPU design. Compare 1:1 and 2:1 without confusing switch ports, links or optics.

Updated Oct 2026 · Learn how AI infrastructure works through explanations, worked examples and diagrams, then practise applying it to interview questions.

TL;DR: With equal-rate ports, oversubscription is downstream capacity divided by upstream capacity. A 32-down/16-up leaf is 2:1; a 48-down/16-up leaf is 3:1. A conventional fully connected two-tier design using 64-port switches and 32 downlinks per leaf supports 64×32=2,048 endpoints. Reaching 4,096 requires a different construction. Show its actual connectivity before quoting a bill of materials.

How to approach it

Fix the endpoint count, port rate and switch radix, meaning the number of available ports. Draw a topology that fits those ports. Count links at both ends of each layer, then calculate the ratios and where the workload crosses those cuts.

A strong answer

You need one network endpoint per GPU for 4,096 GPUs. A spreadsheet says 64 leaves with 32 GPU ports each. That serves only 2,048 GPUs. No routing algorithm can fix missing endpoint ports.

For the conventional two-tier construction, every leaf has one link to each of 32 spines. Each 64-port spine reaches at most 64 leaves, so this construction tops out at 2,048 endpoints. That is a limit of the stated wiring, not every possible network built from the switch.

Here is an illustrative three-level folded Clos with parallel upper links (a folded Clos is the standard leaf, aggregation and spine layout in which every path climbs toward the top and back down), not a claim of minimum switch count. All links have the same nominal rate R. Divide the endpoints into four pods of 1,024 GPUs:

Audit every layer of the fabric128 leaf switches32 GPU ports + 32 uplinks each4,096 endpoints in four pods128 aggregation switches32 downlinks + 32 uplinks each32 aggregation indices per pod64 core switchesTwo cores per aggregation index4 pods × 16 links = 64 portsEqual link rates; 1:1 at each layer.Parallel upper links are explicit.

Within each pod, 32 leaves each attach 32 GPUs. Each leaf has one uplink to each of 32 aggregation switches in that pod. Every aggregation switch therefore has 32 downlinks.

Number those aggregation switches 0–31 in every pod. For each index, provide two dedicated core switches. An aggregation switch sends 16 parallel links to each of its two cores: 32 uplinks total. A core reaches the same aggregation index in all four pods, using 4×16=64 ports. This explicitly accounts for every upper-stage port.

One core, four pod connectionsOne core64 ports used16Pod 116Pod 216Pod 316Pod 416 parallel links to one aggregationswitch in each pod, same index.The second core repeats this wiring.
leaves       = 4 pods × 32 = 128
aggregation  = 4 pods × 32 = 128
cores        = 32 indices × 2 = 64
switches     = 128 + 128 + 64 = 320
endpoint links = 128 × 32 = 4,096
leaf–aggregation links = 128 × 32 = 4,096
aggregation–core links = 128 × 32 = 4,096
all point-to-point links = 12,288
sanity: each core uses 4 × 16 = 64 ports; no port is counted twice.

The capacity counts balance 1:1 at each layer. Topology-Aware Communication connects placement to paths; NVLink and Fabric Faults separates healthy-link capacity from failure diagnosis. They do not guarantee that a particular routing configuration balances every collective perfectly. Parallel paths, traffic placement, failed links and congestion control still matter. NVIDIA's topology validation documentation describes checking connectivity groups and uplink/downlink issues; perform that kind of audit against the built fabric.

For a 2:1 comparison, keep 128 leaves with 32 GPU ports but connect each to 16 aggregation switches per pod. Sixteen leaf ports remain unused. There are now 64 aggregation switches, each with 32 downlinks and 32 uplinks. Use 16 indices and two cores per index, preserving the same 16-parallel-link upper wiring. That gives 32 cores.

Quantity1:1 → 2:1 construction
Switches320 → 224
GPU links4,096 → 4,096
Leaf-to-aggregation links4,096 → 2,048
Aggregation-to-core links4,096 → 2,048
Total links12,288 → 8,192

At a leaf, 32R downstream competes for 16R upstream. The upper stage stays balanced relative to its reduced input capacity. If every link used two separate optical transceivers, the totals would be 24,576 versus 16,384 transceivers. Actual cabling can use other assemblies; do not price a link as a single optic or assume every connection is optical.

Choose the cheaper candidate only if representative jobs meet complete-step and tail-time requirements, including failures and shared load. Compare p99 collective duration as well as median update time. Reverse that decision when exposed communication crosses the allowed budget. A 2:1 cut can constrain traffic crossing it without doubling an entire training step. Traffic that stays under a leaf uses a different path; arranging NIC rails does not by itself guarantee that locality.

What interviewers probe next

  • “What if port rates differ?” Sum capacities, not port counts. Sixteen faster uplinks may match 32 slower downlinks.
  • “Can spare ports restore 1:1?” Only if aggregation/core ports, links, routing and power are also provisioned.
  • “Is the switch count minimal?” No. This is a checkable construction; compare other valid designs and operational constraints.

Common mistakes

  • Claiming 64×32 equals 4,096.
  • Calling a 48:16 split 2:1.
  • Counting aggregate ports without showing which switches connect.

Key takeaways

  • The demonstrated 1:1 design has 320 switches and 12,288 links.
  • Its 2:1 comparison has 224 switches and 8,192 links.
  • A port-valid design is the start of performance validation, not its result.
You can read the first 10 answers per topic without an account. Signing in increases that to 20, includes lessons marked Plus, and saves your progress so you can return to topics you want to review.no card · Google sign-in · nothing to cancel
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 10 to 20 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Draw the upper-stage connections before counting switches. Check every port, distinguish links from transceivers, and explain which traffic crosses the oversubscribed cut.

DISCUSSION · 0

No comments yet — be the first to share your approach.