DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 967,611 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for What is a Peer-to-Peer(P2P) Network in Blockchain?
Saroj
Saroj

Posted on

What is a Peer-to-Peer(P2P) Network in Blockchain?

Hello Guys,

Hope all are doing great!

Today I'm coming up with a new concept that we must know in a blockchain network i.e. Peer-to-Peer(P2P) network.

So, what is a Peer-to-Peer or P2P network?

Any idea?

Cool.

Let's start!

In this article, we will see, how the Bitcoin network works as a P2P network model.

Bitcoin is structured as a peer-to-peer network architecture on top of the internet. The term peer-to-peer, or P2P, means that all the computers that participate in the network are peer to each other, that they are all equal, that there are no "special" or "central" nodes, and all nodes share the burden of providing network services.

Confusing?

Let's try to understand with an image.

Image description

As you can see in the above image, all nodes(peers) are connected with each other, and there are no central or special nodes. The network nodes are interconnected in a mesh network with a "flat" topology. There is no server, no centralized service, and no hierarchy within the network. Nodes in a P2P network both provide and consume services at the same time with reciprocity acting as the incentive for participation. P2P networks are inherently resilient, decentralized, and open.

The best example of P2P network architecture was the early internet itself, where nodes on the IP network were equal. Today's internet architecture is more hierarchical, but the Internet Protocol still retains its flat-topology model.

I hope now you got some idea about the Peer-to-Peer(P2P) network.

Great!

Now, let's see all types of P2P networks.

  1. Unstructured P2P network
  2. Structured P2P network
  3. Hybrid P2P network

1. Unstructured P2P Network

In this type of network, there is no specific organization of the nodes. Participants communicate randomly with one another. Also, this type of network is robust in nature.

2. Structured P2P Network

It allows nodes to precise search for files, even if the content is not available. This type of network is more efficient. And it requires higher maintenance.

3. Hybrid P2P Network

This type combines the conventional client-server model with some facts of the P2P architecture. It also improves the overall performance.

This is the basic idea of a Peer-to-Peer or P2P network. I am sure, you got some idea about it.

That's great actually!

Hope you enjoy this reading. See you soon with a new article.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.