Search code examples
posthyperledger-fabrichyperledgerhyperledger-composer

Hyperledger composer takes about 3 seconds in inserting a record using REST server POST command


I have created an asset and i am sending some data to it using rest server and using post command. The problem is that a single insert record takes about 3 to 4 seconds. I am using fabric v1.2 and composer v0.20. Hyperledger Fabric a throughput of 3500 rps :/ .


Solution

  • I figured this out myself so posting an answer here for it for someone else to find help from this.

    Fabric has a default timeout for a block to get added into the blockchain. By default it is 2 seconds. It wait 2 seconds to get all the transactions and then add them to the blockchain.

    You can modify the block parameter as well for yourself.