'Have you developed or are you in the process of creating an API Server that will be used on a production or cloud environment? In this 4th instalment of my Node JS Performance Optimizations series, I show you how to test the availability of your API Server, so that you can understand how many requests per second it can handle whilst performing heavy duty tasks.

This is a very important measure, especially for production environments, because the last thing you want is to have incoming requests queued as a result of your API Server peaking and not freeing up resources often enough.

A Quick Note

While I’ll be referencing NodeJS in this article, most of the theory and principles mentioned can apply to any platform and environment.

Watch The Video On YouTube

Which Benchmark Testing Tool To Use

The tool I’ll be using for my tests is called AutoCannon. It’s written entirely in NodeJS and is very similar to Apache BenchmarkArtilleryK6Wrk, etc. This is good news because you are not forced to use AutoCannon to follow along with this article. If your benchmark testing tool can perform load tests against HTTP requests and can determine the average requests per second, you’re good to go.

That being said, should you wish to make use of AutoCannon, it’s as easy as installing it globally as an NPM Module:

npm i -g autocannon

#nodejs #javascript #performance #apis #benchmarktest #rest-api #backend #api

How To Monitor Your API Server
1.10 GEEK