paint-brush
Quorum stress-test 1: 140 TPSby@vasa
3,229 reads
3,229 reads

Quorum stress-test 1: 140 TPS

by Vaibhav SainiMay 7th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

So, let’s see how to create a 2 node Quorum network in just a few minutes so that you can also stress-test your own Quorum network. But if you are new to Quorum, I suggest you <strong><em>go through the below article</em></strong>, to get a better understanding of this article.

Company Mentioned

Mention Thumbnail
featured image - Quorum stress-test 1: 140 TPS
Vaibhav Saini HackerNoon profile picture

Recently, I stress-tested a Quorum network consisting of 2 nodes on separate machines, and the result was 140 tps…

So, let’s see how to create a 2 node Quorum network in just a few minutes so that you can also stress-test your own Quorum network. But if you are new to Quorum, I suggest you go through the below article, to get a better understanding of this article.


Quorum 101: Getting started with Quorum_This post marks the first in a new Quorum series I am starting in an effort to provide some easy to read instructions…_medium.com

If you are all set, then let’s get started.

Environment Used

I am using 2 separate AWS machines (Ubuntu Server 16.04 LTS, t2-micro) for 2 separate Quorum nodes. Let us call them quorum-peer-1 and quorum-peer-2.

2 nodes on AWS

Now, if you are running 2 nodes as above then let’s assume IP address of quorum-peer-1 is IP-1 and IP address of quorum-peer-2 is IP-2.

Also, open the following ports in the security group(it’s better to use same security group for both the nodes).

Ports to open(all TCP ports ,accessible from anywhere):

  • 9001
  • 9004
  • 21000
  • 21003
  • 22000
  • 22003
  • 50401
  • 50404

Installing prerequisites

Now, we have to install prerequisites on both the nodes(better option is to use a snapshot and use that for installing prerequisites on both the machines). To install the prerequisites just copy and run the below script on both the machines.

Installing the Quorum application

Now ssh into the quorum-peer-1 and clone the below repository.


git clone https://github.com/vasa-develop/quorum-testnode-1;cd quorum-testnode-1

Similarly, ssh into quorum-peer-2 and clone the below repository.


git clone https://github.com/vasa-develop/quorum-testnode-2;cd quorum-testnode-2

And Voila, you are set to test the network.



P.S. special thanks to benchmarking scripts “chainhammer” https://gitlab.com/electronDLT/chainhammer by Dr Andreas Krueger, Electron.org.uk, London

Initializing network

Now execute the below command on both of the machines simultaneously as a super user (using sudo su).

./start-peer.sh <IP-1> <IP-2>; tail -f qdata/logs/constellation*.log

for example if IP-1 is 12.45.78.55 and IP-2 is 12.45.78.56, then the above command will be like


./start-peer.sh 12.45.78.55 12.45.78.56;tail -f qdata/logs/constellation*.log

Make sure that the IP’s are in correct order, or the script will not work as expected

You will see output similar to below ones.

quorum-peer-1 output

quorum-peer-2 output

If you encounter some error then execute ./stop.sh and again repeat the “Initializing network” step.

Press CTRL+C to exit the logs.

Testing the Network

Now, it’s time to test our network. In the quorum-peer-1 execute the below command

./runscript.sh script1.js

Now, go to quorum-peer-2 and execute the below command

python3 tps.py

You will see output like the below one

quorum-peer-2 output

Now, here is the last command to measure the TPS. Execute the below command to start bombarding private transactions from quorum-peer-1 to quorum-peer-2 . Execute the following command in quorum-peer-1 and you will see output similar to screens shown below.

python3 send.py

quorum-peer-1 transaction bombarding

quorum-peer-2 tps results

Now as you can see, in the above screen that for first 1000 trxs the average tps rate is around 140 tps.

Well, that’s better than many blockchains, but not really mind blowing.

when you go for 1000 tps but end up with 140 tps…

Well, that was it…your first Quorum network stress-test. If you made it to the end then comment you TPS below using different machine sizes. Let’s see how high it can go.

Learned something? Click the 👏 to say “thanks!” and help others find this article.

Hold down the clap button if you liked the content! It helps me gain exposure .

Want to learn more? Check out my previous articles


Setting up your first distributed private storage network on IPFS: Part 1_IPFS Private Storage Network Series_medium.com


13 sidechain projects every blockchain developer should know about_The whole world is going through the blockchain revolution. But wait…is this really what we dreamed of? Present…_medium.com


Hosting a site for free on IPFS_This is a short guide, through which you can have your site running for free in few minutes!! So, let’s get started_medium.com

Clap 50 times and follow me on Twitter: @vasa_develop