For load testing we are using Artillery on AWS (Spot) Instances because we can cheaply get powerful VMs that we dispose of after the testing. Unfortunately the current Artillery version doesn’t make use of the multicore architecture the huge AWS instances offer. It’s supposed to be in Artillery 2.0 but there’s no release date yet. We are using the code from Github to get the multicore feature now. Also there’s no documentation on this feature, therefore this blog post.
Unfortunately they don’t have a 2.0 branch on Github so we will checkout the master branch like so:
git clone https://github.com/shoreditch-ops/artillery
To make Artillery use all cores you need to set the environment variable MULTICORE=1. You can run the artillery script directly from the bin directory but you need to install the required NPM modules first (you also need to have Node.js and NPM installed obviously):
cd artillery npm install MULTICORE=1 ./bin/artillery run -o ../stats.txt ../loadtest.yml
For more information take a look at the source. Start at lib/commands/run.js that, depending on the MULTICORE environment variable MULTICORE, calls lib/runner.js. There you can see that there’s another environment variable ARTILLERY_WORKERS that you can use to scale Artillery. I didn’t test this, though. If ARTILLERY_WORKERS isn’t set Artillery will use the result of the
There’s also a sister project worth mentioning that runs Artillery on AWS Lambda aptly named Serverless Artillery.