Design the model weight distribution system for an inference provider that must push a new 500GB model release to thousands of GPU hosts across multiple datacenters within a rollout window — while production traffic continues on the old version. Naive one-by-one pulls from a central store take hours and melt the store; the weights must arrive verified, the fleet must drain old-version sessions before swap, and rollback must be instant if the new model misbehaves.
How would you design this system? Cover the distribution topology (peer-to-peer/Bittorrent-style fetch versus CDN hierarchy for tensor-sharded artifacts), integrity verification and partial resume, per-host rollout orchestration (drain → swap → health check → admit), version pinning so a request never gets mixed-version shards, and how the rollout interacts with autoscaling events that add fresh hosts mid-deploy.

The Problem: half a terabyte has to reach every GPU host in four datacenters inside a two-hour window, while those same hosts keep serving the old version and stay ready to return to it instantly.
Answer
Treat this as two decoupled problems: moving 500 GB of bytes, and changing which version serves traffic. Bytes move as a signed, chunked manifest: the origin sends one copy into each datacenter’s seed tier, and a rack-aware P2P swarm spreads it so every downloading host also uploads. Verified weights land on local NVMe beside the old version long before any host swaps. A controller then swaps whole replica groups in metric-gated waves (drain, load from local disk, golden-prompt health check, admit), and every request is pinned to one manifest hash so it never touches mixed-version shards. Rollback is a router flip plus a one-minute local reload, never a re-download.
(1) Signed Chunked Manifest: per-rank shard files split into 64 MB chunks, each with a SHA-256 in a signed manifest whose hash is the version identity everywhere downstream.
(2) Two-Tier Topology: the origin sends one copy per datacenter into a seed tier, then a rack-aware swarm moves the rest over the fleet’s own NICs.
(3) Prestage Before Swap: weights arrive verified into a second version slot on local NVMe while v1 keeps serving, so no swap ever waits on the network.
(4) Replica-Group State Machine: drain, swap, health check, and admit run per replica group, one wave at a time behind cohort metric gates.
(5) Version-Pinned Routing: the gateway resolves each request to a manifest hash, and the router only uses groups whose every rank reports that hash.
(6) Declarative Target Version: hosts added by the autoscaler ask the controller which version to load, so mid-deploy capacity joins on the correct side.

Figure 1: The top row moves bytes once per datacenter into a rack-aware swarm and two local version slots; the bottom row changes what serves, with the controller issuing wave orders, the host agent swapping, and a version router gating each wave on health and metrics.
Clarify Before Designing:
(1) Fleet Shape: how many hosts per datacenter and GPUs per host, and is one replica a single host or a multi-host group? That decides what an atomic swap means.
(2) Window & Headroom: how long is the rollout window, and how much capacity can be out of service at once without breaking latency SLOs?
(3) Network Budget: what are origin egress, cross-datacenter WAN, and per-host NIC bandwidth, and does bulk transfer share a NIC with serving traffic?
(4) Local Disk: does each host have NVMe room for two 500 GB versions, so rollback can stay local?
(5) Session Semantics: how long can one generation run, and must multi-turn sessions or prefix caches stay on one version?
(6) Rollback SLO: does “instant” mean traffic off the new version in seconds, or every host back on the old weights within minutes?
Leave a Reply