'Will the P2P example below make my network more efficient?

Say I would like to reduce the amount of overlapping connections in my P2P network, would removing duplicate connections between peers do this, or would it reduce connectivity and create "islands" of peers that cannot be reached?

I have an example below, using the image for context. Sample P2P Network

Scenario:

  • every node creates and maintains a list of all the nodes it is connected to i.e: NODE-E = {D,K,I,F} - NODE-F = {D,K,E}
  • each node then requests lists of its peers, and compares itself with each node
  • for every duplicate connection between itself and the respective node, the comparing peer with the heigher count of nodes will disconnect the duplicate peer.

Although I very interested in libraries and methods that would handle this better, I am more looking to have this specific question answered.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source