Technology Explained

How P2P (Peer to Peer) File Sharing Works

James Bruce Updated 01-10-2018

Software piracy and file sharing existed well before the internet as we know it today, mainly through message boards and private FTP sites. But it was tedious to find files, and even slower to actually download them. It was more common to get your software or music fix from a friend as a physical copy (often called the “sneakernet”).


P2P file sharing changed all that. Suddenly you had a direct line of access to other people’s shared data. But let’s back up a little: what is P2P, how does it work, and where did it start?

Before We Start

Of course, peer-to-peer file sharing technology isn’t only used for piracy. But if we’re honest, that’s why it was created in the first place.

We’ll talk mostly about the file-sharing aspect of P2P technologies, but this certainly isn’t the only use case. We should also note that the term P2P covers a broad range of networks over the past few decades since they were first invented, so not everything here applies in every case. We’ve tried to tackle the topic as broadly as possible.

Not the Client-Server Model

First, we should explain what peer-to-peer isn’t. The rest of the internet generally runs on what’s called a client-server model.

A website hosted on a powerful server somewhere in the world (the best web hosting services), delivers a piece of information when your computer or phone requests it. This might be a font used to display the website correctly, or it could be a 2GB Linux ISO you want to download. The server sends the file to you. When the next user comes along, the process repeats.


Client-server illustration
This is how a client-server internet works. (Image Credit: CorDesign/DepositPhotos)

This works well for websites, but doesn’t scale well for distributing large files. It’s mainly a problem of speed, bandwidth, cost, and legality.

Speed on a traditional web host is quite limited. It’s fine for transmitting small amounts of text to render a website, and some web servers are optimized just to serve images. But for larger files, that would require a burst of speed that isn’t sustainable for long periods and locks the server up for other users. Bandwidth is also costly; just to serve the images here at MakeUseOf costs many thousands of dollars a year.

From a legal perspective, it’s relatively easy to locate a single server, shut it down, then prosecute the owner. P2P was therefore born of necessity. Those who wanted to distribute copyrighted files needed a better way.


What Is Peer-to-Peer?

Peer-to-peer is an entirely different model, in which everyone becomes a server. There is no central server; everyone who uses the network acts as their own server. Instead of simply taking files, peer-to-peer made it a two-way street.

You could now give back to other users. In fact, giving back (known as “seeding” nowadays) is critical to the success of peer-to-peer networks. If everyone just downloaded without giving anything back (called “leeching”), the network would offer no benefits over a client-server model.

P2P Network Illustration
This is what P2P looks like: everyone on the network is serving files to everyone else. (Image Credit: mmaxer/DepositPhotos)

In the client-server model, performance degrades with more users, as the same amount of bandwidth is shared among more people. In peer-to-peer networks, more users make the network more effective. The more users that make a particular file available from their hard drives, the easier it is for new users to get that file.


In modern P2P networks, it’s actually faster when more users download a file. Instead of taking the whole file from one user, you’re taking smaller pieces from hundreds or thousands of others. Even if they only have a little bandwidth to spare for you, the combined connections mean you get the maximum speed possible. Then you, in turn, contribute to distribute the file again.

In earlier forms of P2P networks, a central server was still necessary to organize the network, acting as a database that held information on connected users and files available in the system. Though the heavy lifting of file transfers was done directly between users, the networks were still vulnerable. Knocking out that central server meant disabling communications completely.

This is no longer the case thanks to recent developments. Nowadays, the software can ask peers directly if they’ve seen a particular file. There is no way to knock out these networks—they are effectively indestructible.

A Brief History of Early P2P Software

Now you have an idea of why peer-to-peer networks were such a revolution compared to the client-server model, let’s take a quick look at the historical context.


Napster, launched in 1999, was the first widely available implementation of a peer-to-peer model. A central database contained information about all the music files held by members. You would search for a song from this central server, but to download it, you would actually connect to another online user and copy from them. In turn, once you had that song in your Napster library, it became available as a source for others on the network.

You could also add your own files, which Napster would then index and add to the database, ready to propagate across the world. The implementation was limited in that you could only download from one person, however. The service had a high availability of songs, but speeds were not so great.

Napster File Sharing Program

But with that, the concept of peer-to-peer had unleashed on the world.

Napster was eventually shut down in 2001, but not before similar networks arose that offered more than just music. Movies, software, and images were made available on Morpheus, Kazaa, and Gnutella networks (of those, Limewire was perhaps the most famous Gnutella client).

Over the years, various other protocols and peer-to-peer file sharing software came and went, but one open protocol took hold: BitTorrent.

The BitTorrent Protocol

Designed in 2001, BitTorrent is an open source protocol where users create a meta file (called a .torrent file) containing information about the download, without actually providing the download data itself. A tracker was necessary to store these meta files, along with who currently held that file. However, as an open protocol, anyone could program the client or tracker software.

So even though it needed a central tracker to maintain the databases of those available files, multiple trackers could exist. Any single torrent descriptor file could register with multiple trackers. This made the BitTorrent network incredibly robust and almost impossible to completely destroy. Shutting down torrent sites became a game of whack-a-mole. In its lifetime, The Pirate Bay was killed and resurrected multiple times The History Of The Pirate Bay: Will It Return? The world's most resilient BitTorrent site has been shut down shut down. Again. Will it return – and does it even matter? Read More .

Since the original design, further improvements were made that enabled tracker-less downloads. DHT (distributed hash table) meant the job of indexing available files could distribute among all users. Magnet links are another, but they’re complex enough to warrant an explanation of how magnet links differ from torrent files BitTorrent & Magnets: How Do They Work? [Technology Explained] As we recently reported, The Pirate Bay has switched from using .torrent file downloads to magnet links with no opt-out policy. The tracker has offered magnet downloads for a good while now, but this is... Read More .

Do You Use P2P File Sharing?

I hope this has shed some light on the meaning of peer-to-peer networking and where it began. It’s fair to say P2P networks changed the internet forever. At their peak in 2006, it was estimated that P2P networks collectively accounted for over 70% of all traffic flowing across the internet.

Since then usage has plummeted, mainly due to easily accessible video streaming services such as Netflix and YouTube. Combined with music streaming services like Spotify, there’s really no reason to pirate anymore. P2P networks filled an important gap in our history when traditional media services struggled to keep up. Now, they’re largely irrelevant.

Did you get a chance to use Napster back in the day? Or was your first introduction to file sharing through the humble torrent? Tell us in the comments, or if you want to learn more, check out our complete beginner’s guide to torrents The Torrent Guide for Everyone This beginner's guide is a great introduction to peer-to-peer file sharing with BitTorrent. Get started with torrent downloading in a safe and responsible way with our tips here. Read More .

Image Credit: chromatika2/Depositphotos

Related topics: BitTorrent, Computer Networks, File Sharing, Media Streaming, Peer to Peer, Software Piracy.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Andy
    August 8, 2020 at 5:49 pm

    Tell me, how safe are decentralized networks? I have read many other articles, and for example, this one indicates that this is the highest possible level of data security now. I also read in other articles that decentralization is the future of the Internet model, since Web 3.0 is based precisely on the idea of p2p.

  2. John
    March 23, 2019 at 3:11 am

    Your timeline is inaccurate. Hotline pre-dated Napster by at least 2 years and was used by millions.

    • James Bruce
      March 25, 2019 at 7:16 am

      Hotline wasn't P2P, so it's not inaccurate.

  3. Tashfi Neutron
    October 25, 2012 at 9:26 am

    Wow! Really well written article. Really like this & I guess P2P really changed the internet :)

  4. JbstormburstADV
    August 28, 2012 at 5:53 am

    As a regular user of P2P torrenting, I can tell you right now that the best clients are BitTorrent and uTorrent (whiich is essentially BitTorrent but as a smaller client) because since they are associated with the creator of the protocol, they would know the most about it.

    In fact, websites for private and semi-private trackers are often the best source for discovering good clients due to the presence of "whitelists," or their list of approved clients for use with their tracker. So, let me tell you right now that you want to stay strictly the heck awau from BitComet.

    As for my first mp3, likely LimeWire, since I know by the times I started DLing music, iTunes was distributing AAC almost universally.

    Now, as a non sequitor, EAC. Use it. Love it. Look for burns from it.

    • muotechguy
      August 28, 2012 at 7:32 am

      Care to elaborate on why BitComet is so bad?

      • JbstormburstADV
        August 28, 2012 at 12:47 pm

        Those rumors about BitComet messing around with the DL/UL ratio? Truer than true can be. Additionally, BitComet has some features that create problems in certain seeding situations (i.e.: initial seeds, DLing with only 1 seed and no leeches). All in all, it's a ratio cheater's bittorrent client.

  5. MerVzter Balacuit
    August 27, 2012 at 12:03 am

    additional information about p2p thumbs up!

  6. venkatp16
    August 26, 2012 at 1:59 pm

    Nice explanation.

  7. GrrGrrr
    August 25, 2012 at 8:24 pm

    Nice article James, and well explained.

    On where did your first mp3 come from? - through data transfer..from someone else

    • Valentin
      August 25, 2012 at 10:19 pm

      Same here, using a Terminal port. If that even makes sense

      • muotechguy
        August 28, 2012 at 7:35 am

        Is that the same as a null modem cable? I had one of those for 2 player duke nukem before we could buy network cards... I think that was well before the time of mp3 though.

        My mp3s were inherited from a friends brother who was at uni with a fast internet pipe. He had 40 CDs full of 80's and 90's pop; I forget how many songs there were in total, but around 1000 or so?

  8. Ashwin Ramesh
    August 25, 2012 at 11:31 am

    Very well explained! Thanks for shedding light on this topic, James :)

  9. Juan Carlos Espinosa Agudelo
    August 24, 2012 at 11:51 pm

    On a different topic, I have one question, which just randomly popped up in my mind while reading your article:

    Would it be possible for a server to work in an identical way? Like for example a game server, working on a P2P network, instead of one main server. Is that possible? And would it be useful?

    • muotechguy
      August 25, 2012 at 8:25 am

      That's an interesting question, but I don't think the model is suitable for things like a game server. Games rely on low latency; something which p2p is terrible at - they can help shift large chunks of data, and fast, but getting things started is slow and the data is of a different type to that used in gaming. Playing a game simply doesn't need a huge chunk of data from many different users.

      Syncronising all that data between p2p users would be exceedingly difficult; you really do need a central server to handle it all. Even if you did have each peer sending their actions to every other peer, there would quickly be a mismatch where one peer got the news they'd been shot earlier than another, so one is thinking they're safe, while the rest say they've been shot.

      Things may change when a new p2p protocol is invented, but personally I dont think logically it would.

      However, p2p could still be useful in gaming: like distributing a new map pack.

  10. Juan Carlos Espinosa Agudelo
    August 24, 2012 at 11:48 pm

    My mom told me she was a user of Napster and became pretty sad when it taken down.

    Personally I've tried some clients, Bittorrent, uTorrent and Tixati and a couple of my classmates use others, such as BitComet and one of my classmates used Tribler for a short while after I told him about it.

    Considering uTorrent and Bittorrent are so alike now, I can't really say which is better, except in the details I think that uTorrent's a bit better. Tixati's community all say it's better than uTorrent, but considering I don't know the details of each very well, I can't tell.

    Vuze's a huge packet of stuff, so it's not really something I want if 'all' I want is to download something quick. I don't know much about BitComet, except that their Wikipedia page says they had some controversy. BitSpirit's apparently used by anime-downloaders.

    Xunlei's the most used Bittorrent-Client worldwide, since most of the users are in China. It has gotten some criticism for not being that great at the download/upload ratio. It doesn't help the P2P community that much, just gives it's users some downloads.

    • muotechguy
      August 25, 2012 at 8:19 am

      I didnt know xunlei could do torrents; I thought it was typical spamware filled chinese download manager crap ;) Vuze/Azureus was my favourite for a while, but the bloat got too much (the name change was the last straw). I can't say I've ever checked out the "official" bittorrent client though.

      thanks for the input!

  11. Erlis D.
    August 24, 2012 at 8:46 pm

    I would say greatly explained!
    I studied about P2P at school, but it wasn't explained so good!
    Also love the illustrations you put on it...
    If you had posted it earlier, I would have showed it at my professor when we did a presentation... Anyway, got some extra info too! ^_^

    • susendeep dutta
      August 26, 2012 at 3:49 am

      In schools and colleges,P2P is taught as though it's same as client server network since they don't put much emphasis on it and they lack any awareness.

      • Erlis D.
        August 26, 2012 at 9:21 am

        No, we could get the difference by then too.. But it wasn't illustrated with such good pictures...

    • susendeep dutta
      August 26, 2012 at 3:52 am

      I firstly got my mp3 in a form of CD as a complement in disc-man purchase from a store retailer.

    • Zoopy Joobles
      December 26, 2014 at 5:43 pm

      I used to download Apple ][ software on my 300 baud modem from my favourite BBS. Those were the days!