O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time to test

To do load testing, I would prefer a simple load test module (https://www.npmjs.com/package/loadtest) rather than setting up the entirety of Jmeter. Install the module by simply installing npm install loadtest -g.

Next, just to run the stress test, we can hit the following command:

loadtest -c 100 --rps 250 <my-aws-load-balancer-url>

Here, -c means concurrent requests and --rps means requests per second for each client. This will trigger an alarm to increase the CPU count by 2. Go to the AWS console after the alert time/wait period has elapsed to check your newly created instances. You will be able to see instances when the load has increased and after the load has decreased, it will automatically start to drain and terminate. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required