Tools I used to Load Test my API

This post is inspired by Zayd Simjee, and his article on why load testing is important.

For my API I wanted to see how many users can be handled since I'm using a EC2 micro for the MVP, I just wanted to show the client how many real users can be registered and from that point, grow the service.

Because of NDA I can't really give details on the API, but its built on Laravel 8.

This is the first time I'm in charge of doing load tests, so I did a bit of research on tools that I could use locally for load tests.

I know of gatling and other pro-tools used, but when doing research on them, the configuration seemed a bit complex for what I wanted to achieve.

Once the project was setup on AWS, I made some basic load testing on the some endpoints using some local and cloud tools.

Artillery.io

I chose this tool because it was easy to install and get it running, the config file was easy enough to understand. Since I was using the free version, no UI is presented so I had to setup a grafana docker to read the results.

With this tool, I found a throttle limit of 60 requests that was making my API fail, once this throttle was removed, tests started to run more smoothly. Once I started hitting 300+ requests to the API my ISP started blocking me and resetting my connections, so I had to move to a cloud tool.

Loader.io

I created a free account, with it, I was able to make more than 300 requests to the API, that bad part is that it only allows one endpoint per test, so I had to make 8 tests to check the whole API, and the file upload documentation was a bit confusing, so I didn't test those endpoints.

with this tool, I found a bottle neck and a misconfiguration on the server, so it helped me a lot.

K6.io

while they do have an open source version, I couldn't use it because of the limit my ISP has on the requests, so I created a free cloud account, with a single test I could hit all the endpoints, so the results became more realistic as to the number of users the API could handle.

With this tool, I found another bottle neck in the background events, which lead to a refactor of the code.

Once finished with the load tests, we created a report explaining to the client how many endpoints there are on the API, and and approximate on how many users it can handle.

Hope my story helps you in some way, because using all these tools certainly helped me.