Does hyperledger fabric use structured p2p? - hyperledger-fabric

P2P has two different structures.
one is unstructured P2P and the other one is structured P2P.
I know fabric use hybrid-P2P.
And is it use strutured P2P?

Hyperledger Fabric really uses "structured" peer to peer communication.
Peers communicate with ordering service nodes and with other peer nodes.
Channels form the basis of the peer to peer communication (meaning that communication is scoped on a per channel basis).
For peer to orderer communication, this is structured based on channel definitions .... when a peer joins a channel, the channel definition is contained in the block passed via the JoinChannel API. This is a special type of block known as a config block and it contains the information about the ordering service endpoints, membership for the channel and optionally the endpoints of peers from other organizations (anchor peers).
Peers which belong to the same organization can also "gossip" and this is configured by setting a bootstrap peer when a peer starts up. From this, the peers within an org will "discover" each other.
If an organization chooses to expose public endpoints from multiple peers, peers from other organizations will discover these peers by connecting the to anchor peer for the other org for a given a channel.

Related

How many peers(hyperledger fabric) do we need?

I thought peer's roll is processing transaction, managing chaincode and ledger.
Already I know there are endoring peer, committing peer, anchor peer, leader peer.
My question is how many peers are needed.
According to fabric docs, when client doing something, it approaches the peer by changing the env.
For example, if there are 1000 clients who access the same channel at the same time, do they need at least 1000 peers? I asked this question because there is only one client in the tutorial.
Many clients can access a single peer. Typically there will be multiple organizations in a Fabric network, with each organization having a few peers for redundancy and load balancing of client requests.

Hyperledger Fabric Metric for peer communication with individual peers

I'm trying to use Hyperledger Fabric to track communication with individual peers. Assuming that our peer is connected to 3 other peers, I'd like to track metrics for each individual connection to those peers.
I see there is a metric for gossip.comm.messages_sent, but I assume it only counts the total number of messages to all peers. Is there a way to get message counts for the connection to individual peers? I.e. a per-peer communication metric? Or any other way to track the communication between individual peers?

Fabric orderer to peer configuration for deliver RPC

We've a below network setup for hyperledger fabric:
3 Ordering Service nodes, 4 Kafka brokers and 3 Organizations (2 peers in each organization)
Requirement is - we need to make sure leader peer from each organization is receiving blocks via deliver RPC from a "specific" ordering service node.
How can we configure a specific ordering service node for peers in fabric?
There's no "magic" way to configure something like this in Fabric. The orderer endpoint information is stored in the system channel so normally all 3 of the Ordering Service endpoints would be in their so that any peer from any organization is aware of all the endpoints (for fault tolerance).
With the current Kafka-based ordering service, you might be able to achieve what you want by only setting a single endpoint in the orderer addresses section and then making sure that each organization resolved that DNS name to the specific endpoint desired.

Communication between hyperledger ordering services

This question is about orderers in different organizations. Is there any communication happens between two orderers of two different organizations? If so, how can we configure that and how does the consensus work?
(OR)
Is every organization has its own ordering service with multiple orderer nodes isolated from other organizations?
Any help understanding this would be appreciated.
There is only 1 ordering 'service'. This service is composed of several orderers. Usually just 3 or 5. All orderers communicate with the Kafka cluster which tells all the orderers what is included in a block. The orderers then send the new blocks to the peers. Peers may use any of the orderers. It is recommended to have all orderers within one Org. But I have run a configuration with 2 orderers in 1 org and 1 orderer in another org and it works fine.

Create channel between 2 peers in the same organization in Hyperledger Fabric

In HyperLedger Fabric is it possible to create a channel between peers that belong to the same organization / MSP? If so, how can this be configured in crypto-config.yaml and configtx.yaml?
Just specify a single organization in the configtx.yaml
However, you have to include some orderer in the channel too.
The orderer can also be in the same organization as the peers.

Resources