Simple questions: What is P2P (peer-to-peer) and why is it useful?
If you are using the internet regularly, it is highly unlikely that you have not heard of the term peer-to-peer or the acronym P2P. Whether it was mentioned in a news article, on TV or in a conversation with a friend, who told you that he just downloaded the latest episode of Game of Thrones, you may have stumbled upon this term. If you want to know what peer-to-peer is, and what it is used for, you should read this article:
What is P2P or peer-to-peer?
Peer-to-peer, or P2P in its abbreviated form, refers to computer networks that use a distributed architecture. That means that all the computers or devices that are part of it share the workloads in the network. The computers or devices that are part of a peer-to-peer network are called peers. Each peer from a peer-to-peer network is equal to the other peers. There are no privileged peers, and there is no central administrator device in the center of the network.
In a way, peer-to-peer networks are the socialist networks in the world of computing. Each peer is equal to the others, and each peer has the same rights and duties as the others. Peers are both clients and servers at the same time.
Furthermore, every resource available in a peer-to-peer network is shared among the peers, without any central server being involved. The shared resources in a P2P network can be things such as processor usage, disk storage space or network bandwidth.
What do P2P (peer-to-peer) networks do?
The primary purpose of peer-to-peer networks is to share resources and help computers and devices work collaboratively, to deliver a specific service or perform a particular task. As we mentioned earlier, P2P is used for sharing all kinds of computing resources such as processing power, network bandwidth or disk storage space. However, the most common use case for peer-to-peer networks is for sharing files on the internet. Peer-to-peer networks are ideal for file-sharing because they allow the computers connected to them to receive files and send files simultaneously.
Consider this situation: you open your web browser and visit a website from where you download a file. In this case, the website works as a server, and your computer acts as a client which receives the file. You can compare it to a one-way road: the file that you download is a car that goes from point A (the website) to point B (your computer).
If you download the same file through a peer-to-peer network, using a BitTorrent website as a starting point, the download is performed differently. The file is downloaded to your computer in bits and parts that come from many other computers in the P2P network that already have that file. At the same time, the file is also sent (uploaded) from your computer to others which ask for it. This situation is similar to a two-way road: the file is like multiple small cars that come to your PC but also leave to others when they are requested.
Why are peer-to-peer networks useful?
P2P networks have a few characteristics that make them useful:
- They are difficult to take down. Even if you shut down one of the peers, the others continue to work and communicate. You have to close down all the peers for the network to stop working.
- Peer-to-peer networks are extremely scalable. Adding new peers is easy as you do not need to do any central configuration on a central server.
- When it comes to file-sharing, the larger a peer-to-peer network is, the faster it is. Having the same file stored on many of the peers in a P2P network means that when someone needs to download it, the file is downloaded from many locations simultaneously.
Why do we need peer-to-peer networks? Legal use-cases for P2P
We need peer-to-peer networks to connect computers and devices without having to configure a server. Having to create a server for everything is very expensive and difficult to manage, and people use cheaper alternatives like P2P. Here are a few examples of common use cases for P2P networks:
- When you connect the Windows computers in your home to a Homegroup, you create a peer-to-peer network between them. The Homegroup is a small group of computers that are connected between themselves to share storage and printers. This is one of the most common uses for peer-to-peer technology. Some people might say that Homegroups can’t be peer-to-peer because the computers in the network are connected to a router. However, keep in mind that the router has nothing in common with managing what the computers from the Homegroup share among themselves. The router does not work as a server but merely as an interface or gate between the local network and the internet. If you want, you can find more information about the way Microsoft chose to implement the P2P technology, in these articles: Peer-To-Peer based Features in Win 7, [MS-HGRP]: HomeGroup Protocol, and HomeGroup: A practical guide to domestic bliss with Windows 7.
- When you create an ad-hoc network between two computers, you create a peer-to-peer network between them.
- Sharing large files over the internet is often done using a P2P network architecture. For example, some online gaming platforms use P2P for downloading games between users. Blizzard Entertainment distributes Diablo III, StarCraft II and World of Warcraft using P2P. Another large publisher, Wargaming, does the same with their World of Tanks, World of Warships and World of Warplanes games. Others, like Steam or GOG, choose not to use P2P and prefer maintaining dedicated download servers around the world.
- Windows 10 updates are delivered both from Microsoft’s servers and through P2P. There is more information about this feature here: Optimize Windows 10 update delivery, here: Microsoft to deliver Windows 10 updates using peer-to-peer technology, and here: Microsoft clarifies Windows 10 peer-to-peer update controls.
- Many Linux operating systems are distributed via BitTorrent downloads that use P2P transfers. Such examples are Ubuntu, Linux Mint, and Manjaro.
P2P networks are the cheapest method of distributing content because they use the bandwidth of peers, not the bandwidth of the content’s creator.
The history of P2P networks
The precursor of peer-to-peer networks appears to be USENET, which was developed in 1979. It was a system that allowed users to read and post messages/news. It was a network system similar to the online forums today, but with the difference that USENET did not rely on a central server or administrator. USENET copied the same message/news to all the servers found in the network. Similarly, P2P networks distribute and use all the resources available to them.
The next big thing in the history of P2P was the year 1999 when Napster came to life. Napster was a file-sharing software that was used by people to distribute and download music. The music shared on Napster was usually copyrighted and thus illegal to distribute. However, that did not stop people from getting it. Although Napster was the one that got P2P into the mainstream, Napster ultimately failed and was shut down by authorities because of all the content that was shared illegally on it. Nowadays, P2P remains one of the most popular technologies for sharing files over the internet, both lawfully and unlawfully.
Image source: Wikipedia
Illegal uses of peer-to-peer networks
P2P is a controversial technology because it is widely used for piracy. There are many websites on the web that offer access to copyrighted content like movies, music, software or games, through P2P networks, due to the advantages of this technology. While the technology itself is not illegal and it has many legitimate use cases that don’t involve piracy, the way some people use P2P is illegal. When using P2P, make sure not to engage yourself in piracy or other use cases that are punished by law.
As you have seen in this guide, peer-to-peer is a complex technology that was born and based on a simple principle: decentralization. We also know now that its purpose is honest, but its use is not always for good. Some people argue whether it should be prohibited or not because P2P remains the most important means of distributing copyrighted content unlawfully. However, should a pen be forbidden from use because the writer is bad at its craft?