Our end-users who’ve had a chance to play with the CSR component of MyChattanooga have commented on how fast it is. Music to our ears! Of course it’s still in development, so there’s no significant load.
I fixed that with Vegeta, a free-and-open-source load testing tool that I’ve used in the past for various web projects. Vegeta, a command line tool, allows you to pound away at a site or endpoints and graph the results. I wanted to see how our APIs could handle load, so I ran a few tests.
I started with 200 hits-per-second against 5 endpoints (all going though our API gateway) over 10 seconds. As you can see, there was a peak during the connection phase (about a half-second) followed by a long plateau of less than 1/10th of a second.
I cranked it up to 300 hits-per-second and we still did pretty well:
I was interested at this point in seeing how scaling the services would impact the numbers. I scaled the API gateway from 2 out to 5 instances, and each of the NodeJS microservices (the API programs) from 2 to 3. I re-ran the test, still at 300 hits-per-second over 10 seconds:
You can see how scaling up the services improved the numbers; we went from an overall peak of 1.2 seconds down to .8.
None of the numbers were bad to begin with, but this gave us a chance to see how we’re doing performance-wise. It also graphically illustrates how containers and microservices should help us keep MyChattanooga on top of its game.