System Design Problem

Design a P2P File Transfer System (like BitTorrent)

Commonly Asked By:BitTorrentNetflixSpotifyValve

  • Distribute large files (100MB-100GB) across thousands of peers without central server bottleneck
  • File split into fixed-size pieces (256KB-4MB); each piece independently downloadable
  • Peer discovery: find peers who have pieces of the desired file
  • Piece selection: download rarest pieces first (rarest-first strategy)
  • Tit-for-tat: preferentially upload to peers who upload to you
  • Torrent file / magnet link: metadata describing file, piece hashes, tracker URL
  • Distributed Hash Table (DHT): trackerless peer discovery (Kademlia)
  • Integrity verification: SHA-1 hash per piece
  • Resume interrupted downloads; partial file sharing while downloading
Loading...