Parallel request to sendRawTransactionfrom api got failed

+1 vote
I have a blockchain node and one app server connected to that node. I tried to perform stress testing using Apache JMeter tool. so I fired 100 requests in parallel to my app server's API which in turn calls createRawSendFrom API of the node. the job of the API to save some data in the stream. when I made 100 requests all the request was successful with the txn_id in response. but when I picked up one of the txn_id and called get wallet txn_id API it returned "invalid txn_id" and also data was not saved in the stream for that particular API call.

My assumption is- createRawSendFrom api is based on "coin selection algorithm" to get the input from the unspent output. so do I need enough number of unspent output (in my case 100)
asked Dec 10, 2018 by anshuman

1 Answer

0 votes
The node takes care of ensuring that double-spends don't happen for requests performed, even if they are sent to it simultaneously, so this should not be the issue. However if you are using multiple nodes which are sharing addresses then you run the risk of them performing double-spends against each other – please see this guide for more information:
answered Dec 11, 2018 by MultiChain