What is P2P (peer-to-peer)?
A peer-to-peer network, or P2P for short, doesn’t have the typical client-server structure. Instead, all data is distributed in a decentralised manner as all the computers in the network equally act as a server and client.
What is peer-to-peer?
The meaning of P2P is a network of computers that have equal privileges and the same functions. In a classic client-server model, the clients make requests that are then answered by the server. In a peer-to-peer network, all parties can act as both a server and a client. The entire network is organised in a decentralised manner and a parent-level server is not needed. In a simple P2P network, all computers are connected to each other, whereas in more complex peer-peer structures the participants are divided into groups.
How does P2P work?
To understand how peer-to-peer works, let’s first take a deeper look at the classic client-server structure: When you download a file, you open your browser, visit the corresponding website and make a request to the server. The server provides the file you are looking for and transfers it to your computer. The transfer runs exclusively in one direction and the roles of client and server are clearly defined.
However, if you make a similar request in a P2P network, you are not sending the request to a central server but to multiple computers at once. All the computers or peers who have this data will provide it to you. You are actually downloading separate sections from multiple sources. At the same time, all the sections you received will be available for other users to download from your computer. The transfer runs in many different directions simultaneously, as all connected computers in a P2P network can act as a source and a destination.
What types of peer-to-peer architectures are there?
There are multiple different types of P2P architectures and structures. P2P networks can be roughly divided in to structured and unstructured systems. The degree of centralisation or decentralisation also plays a major role in distinguishing between different peer-to-peer systems.
Structured and unstructured peer-to-peer systems
Unstructured P2P systems don’t contain any information about the links between the individual sources and the destination. Data or fragments can only be found in that specific system. These peer-to-peer networks mostly work via search requests. When a file is needed, the recipient sends a request to all computers in the P2P network. This procedure is known as flooding.
When more systems are integrated in a network, the requirements for the entire P2P system increase as well. In structured peer-to-peer systems the information about links is often stored in a distributed hash table (DHT). Search queries can be more targeted and answered from a distributed index. Flooding is not required with this method.
Centralized and decentralized P2P networks
Peer-to-peer systems are further divided into centralised and decentralised networks. Centralized P2P networks use a central server that is responsible for the management of the whole system. This is comparable to the servers of other network types. In a centralised network, certain tasks or rights can also be distributed between multiple computers that’ll manage data streams or address lists, for example. If new users want to join such a peer-to-peer network, they need to put personal data on this central server. The actual data exchange continues to take place between individual computers and is only controlled by the central server.
Decentralised peer-to-peer systems completely renounce all control mechanisms. Instead, all information is stored on all computers. However, this approach has its risks, so a few special solutions have been established. In friend-to-friend or Web of Trust networks, the workload is likewise distributed equally across all participants, but only users who know each other are permitted to enter the P2P network. This ‘trusted friends’ principle creates a basis of trust and prevents misuse of the decentralized peer-to-peer system.
Hybrid peer-to-peer networks
Hierarchical or hybrid P2P networks are a special case. Essentially, they are decentralised as well, but rely on particularly powerful computers within the community. These computers make an important part of the infrastructure through their large bandwidth and high computing power. Administrative tasks in particular are performed via these super nodes. The rest of the data transfer still takes place between the individual computers.
What are the benefits of P2P?
Peer-to-peer systems offer many benefits. It’s thus no wonder that companies and communities invest a lot of time and resources into developing and upgrading these networks. Below are just a few of the most important benefits of P2P:
Scalability
Theoretically the capacity of a peer-to-peer network is limitless. The more computers belong to the network, the higher its performance can be. Every new member gives out their capacity, memory storage and bandwidth to be used by the whole community. So, the whole workload is shared by multiple members.
Safety
This also strengthens the whole security architecture of a P2P network. As there is no central server, at least in the decentralised system, it also can’t be attacked. Even if one network computer fails, it has only a minimal impact on whole system. The same also applies in an event of a malware attack, which can affect a single computer, but is usually blocked by the whole system. Only disturbances in the super node will be noticed on a larger scale.
Flexibility
All tasks can be flexibly divided in a P2P network. This is especially beneficial in the case of a failure, as its impact can be softened. Flexibility is however also advantageous a in normal operation mode. The tasks can be divided so that each member contributes to the group whilst providing comparable or even larger resources to all. The client-server model in comparison requires particularly sophisticated hardware to perform specific tasks.
What are the disadvantages of P2P?
The benefits of a peer-to-peer system seem convincing at first. However, it has some disadvantages that should be considered in advance. Especially the following aspects are worth mentioning:
Effort
Managing and organising a P2P network is relatively time-consuming. Because a central control authority usually doesn’t exist, changes and problems must be clarified amongst all participants.
Dependencies
P2P systems function more independently than client-server solutions, but it can also have an opposite effect. Changes to one computer within the network may have an impact on all other systems since they are all interconnected. Data availability can also be restricted if data is deleted on one computer, and it’s also not offered by any other network member. Flooding also places a burden on all connected systems and may lead to high number of requests on individual computers.
Legal issues
Freedom is one of the biggest benefits of the whole peer-to-peer concept. It can however be misused due to the lack of a control mechanism. For example, it’s hard to prevent users from uploading copyrighted content. Prosecution is also much more complicated in a P2P network.
What is P2P used for?
To be a part of a peer-to-peer network, you need to install a special P2P software on your computer. This will enable you to use various applications and services that work according to the peer-to-peer principle. These include:
Filesharing
For a long time, the most popular but also the most controversial form of peer-to-peer networks on the internet were different filesharing services. The problem was of course frequent cases of copyright infringement. However, filesharing is principally legal and very practical. A P2P network is just one of several possible methods for filesharing.
Use secure filesharing for free with HiDrive Share from IONOS. Share as many files as you want without software or registration.
Messenger and VoIP
Messaging and VoIP (video over IP) services also often use the P2P concept by relying on different hubs instead of a one central server.
Distributed computing
In research, peer-to-peer is used in the form of distributed computing. It’s a process of carrying out multiple sub-processes on different computers that then in the end are combined to produce an overall result.
Blockchains
P2P plays a crucial part in the world of crypto currencies and blockchains. It enables the transactions to be carried out without a central server or a middleman.
Internal networks
A peer-to-peer network can also make sense in an office setting. Data from all computers is always available to all authorised persons. In addition, scanners, printers and other work materials can be controlled from the network.