0

how should you keep your hyperledger fabric transaction scalable in terms of choosing peers? Basically, removing the randomization of choosing a peer by the node and giving us the ability to select the peer we want to share the transaction with?

  • The terms you used are too vague. What do you mean by choosing peer? by node, you mean the NodeJS SDK? What is sharing transaction, do you mean endorsement? – Christopher Dec 23 '21 at 03:18
  • by choosing a peer I meant having the ability to share certain data only with a specific peer of our choice. No i meant transactions. – Utkarsh Sharma Dec 23 '21 at 17:29
  • I don't think you understand what blockchain is. Every peer share the same "ledger" in a channel. Those data are meant to be shared to each other because it is a trustless environment. You can't say Peer 0 has Block 1, 2, 3, 5 but does not have 4. It is not a "chain" anymore. Every peer has to have Block 0 (Genesis) all the way to the latest block to work (Accept transaction and so on). Or maybe you are referring to different organization peers? – Christopher Dec 24 '21 at 05:22
  • I think you're losing track of the question here, Christopher. My exact question is whether or not we can choose a specific peer to show the transactions. If we can choose a specific peer, how do we do that using a transaction peer event handler? – Utkarsh Sharma Dec 24 '21 at 11:50
  • It's the terms you use to describe the question, like what I mentioned in the first comment. The "show", do you mean by querying from an exact peer? Ask question in specific terms, so people can identify what you really want to do, else who could help? – Christopher Dec 27 '21 at 02:13
  • You need to add more clarity to your question as it's impossible to provide a comprehensive or accurate answer. For example ) is this question about transaction submission or a transaction evaluate or both ? 2) Is it only about block events which you allude to in one of the comments ? 3) are you concerned about private data collections ? 4) Is your goal here to provide some sort of load balancing from the client ? 5) which client SDK are you using or planning to use ? They don't all work the same way. 6) how many organisations are part of the network ? – david_k Dec 27 '21 at 12:01

1 Answers1

-1

Please consider upgrading your Fabric application to use the new Gateway release (2.4.x). Gateway client based applications now have the ability to connect to a single "gateway peer" in the Fabric network, which in turn serves as a proxy to allocate requests across peers in the network. In addition, for Fabric networks deployed to Kubernetes, the Gateway Peer hostname can be set up to reference a HA / Load-Balanced set of peers with a common DNS name. Additionally if you are running your Fabric network in a k8s environment the use of IPVS proxy mode service routing can provide a few additional control dials for routing the node selector when clients connect to the peer.

In general, the recommendation is to use the new features provided by the Fabric Gateway release (2.4.x) for distributing the client connections to peers in a scalable and reliable fashion.

Josh
  • 22
  • 2