KatInterview

Fast Fan-Out of a 500 GB Checkpoint Across a GPU Fleet

System DesignModel answer
MediumModel answerSystem Designsystem-designnetworkingpeer-to-peer

Last updated

Work out the minimum time to push a 500 GB model checkpoint to 100-1,000 machines with 10 Gbps shared links, then design a chunked peer-to-peer rollout that approaches it.

A freshly trained model has 500 GB of weights. Before a fleet of 100 to 1,000 GPU machines can serve it, every machine must hold a full copy. One machine holds the weights at the start. Every machine, including that one, has a 10 Gbps network interface whose capacity is shared between sending and receiving. Assume no particular network topology and that links can run at full speed.

Answer in three parts.

Part 1: Lower bound. Derive the minimum possible distribution time for 100 and for 1,000 machines. Show where each limit comes from. Also show how the answer changes if "shared" is read as "10 Gbps in each direction" instead.

Part 2: Design. Begin with the simplest approach and state its completion time. Then evolve it into a design that comes close to your bound. Cover:

  • how the weights are split up
  • how a machine decides where to fetch each piece
  • what the coordinator does, if you use one
  • how you verify that every copy is correct

Part 3: Operating it. Explain how you handle:

  • slow or failed machines mid-transfer
  • machines that join late
  • a corrupted piece of data
  • switching from the old model to the new one without downtime, including rollback

Also name the metrics you would watch while a distribution is running.

State your assumptions about anything the problem leaves open.

Hints

Hint 1

Convert carefully: 500 GB is 4,000 gigabits. Compute the time for one machine to receive it, then ask what extra constraint appears when every byte must be both sent by someone and received by someone, and sending and receiving draw on the same 10 Gbps.

Hint 2

A naive source-to-everyone copy takes time proportional to the number of machines. Break the file into chunks so that a machine can start forwarding a chunk the moment it has it, and consider what limits a chain, a tree and a swarm when upload and download compete.

Hint 3

For operations, think per chunk rather than per file: a per-chunk hash from a signed manifest, per-chunk retries from other peers, and a persisted bitmap of finished chunks for resume. Separate downloading from activating, so the old model keeps serving until the new one is verified and loaded.