fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Fix the "running chaincode as an external service" doc section

Open kmilodenisglez opened this issue 4 years ago • 2 comments

The Fabric doc says that "Using this chaincode as an external service model, installing the chaincode on each peer is no longer required"

But this statement can confuse a user who has an organization with at least 2 endorsing peers:

Q: Do I need to install chaincode on a second endorsing peer too?

A: Using an chaincode as an external service model, you will need to install a chaincode package on every peer which will execute it.

I think that the paragraph should be modified to make it clear that if a user has at least 2 endorsing peers, he must install the chaincode in each peer

link: https://hyperledger-fabric.readthedocs.io/en/release-2.4/cc_service.html#running-the-chaincode-as-an-external-service chaincode_as_an_external

@denali49, @nikhil550, @ODOWDAIBM, @pamandrejko

kmilodenisglez avatar Apr 20 '22 17:04 kmilodenisglez

I agree that it is confusing, because the chaincode package must be installed on every peer where the chaincode will be invoked, even though the installed chaincode package doesn't include the actual chaincode logic. This should definitely be clarified.

This is also probably the right place to discuss another frequent question - the cardinality of peers to external chaincode services. That is, can two peers point to the same external chaincode service endpoint? Alternatively, can one peer point to an external chaincode service endpoint that actually represents multiple chaincode service instances made available through a load balancer?

For the latter questions, let's ask @jkneubuh @mbwhite to comment as they have investigated this area in several deployment environments.

denyeart avatar Apr 21 '22 20:04 denyeart

Hi @denyeart and @kmilodenisglez

The TL/DR summary and current recommendation is to deploy CCaaS endpoints 1:1 with the peers, utilizing the Gateway Client as a mechanism to distribute transaction load across a set of peers.

Please see the notes and discussion at #3350, or the original Discord thread #LOAD BALANCING CHAINCODE for some additional context.

jkneubuh avatar Apr 22 '22 12:04 jkneubuh