P2P Networks: Napster and Gnutella

Today

First & Second Generation P2P Networks: Napster and Gnutella


The Problem: Everyone wants the music, nobody wants to pay

It's 1999. You want to download a song. Your options? Buy the whole CD for $18 or find it somehow on the internet. But files are hosted on central servers — if the server goes down, or the music label sues it, the file disappears. One point of failure, one lawsuit, game over.

The root cause is simple: centralized servers are a single point of control and failure.

So what if... we made everyone the server?


First Generation: Napster (1999)

Napster's big idea was peer-to-peer file sharing — your computer connects directly to my computer to get the file. No middleman hosting the data.

But Napster wasn't fully decentralized. It used a hybrid model.

Protocol: Napster Protocol (proprietary, over TCP)

Think of it like a phonebook (centralized) but the actual phone calls happen directly between people.

Architecture Diagram

Napster Architecture — Central Index Server with P2P File Transfer

The Fatal Flaw

The phonebook is still owned by Napster. The RIAA sued, the index server got shut down in 2001, and Napster died overnight — because without the central index, nobody could find anybody.


Second Generation: Gnutella (2000)

After watching Napster fall, developers thought: what if there's no central server at all? Every peer is equal. No index. No phonebook. Pure anarchy.

Protocol: Gnutella Protocol (open, over TCP)

Gnutella used a fully decentralized, flooding-based model:

It's like shouting in a crowd — "Does anyone have this song?" — and waiting for someone nearby to shout back.

Architecture Diagram

Gnutella Architecture — Fully Decentralized Query Flooding

The Catch

Flooding is expensive. Every search spams the whole network. Gnutella struggled to scale because popular queries generated massive traffic. Later versions introduced ultrapeers (more capable peers that took on routing duties) to fix this — slightly resembling Napster's hierarchy again, ironically.


Side-by-side Comparison

Napster Gnutella
Generation 1st 2nd
Architecture Hybrid (central index + P2P transfer) Fully decentralized
Protocol Proprietary Napster protocol / TCP Gnutella protocol / TCP
Search Central server lookup Flooding with TTL
Failure point Central index server None — but scales poorly
Killed by Lawsuit (server taken down) Survived, but replaced by better designs

The Takeaway

Napster solved the distribution problem but left a legal target wide open. Gnutella solved the centralization problem but created a scalability problem. Each generation learned from the last — and this arms race between resilience and efficiency led to the much smarter designs that followed (BitTorrent, DHT-based networks), but that's a story for another post.