Building Artillery.io • Interested in OSS, SRE, product design, SaaS • always up for coffee ☕ • h@veldstra.org • @hveldstra
_._ _/:|: /||||||. ||||||||. /|||||||||: _ _ /||||||||||| _| |_|___ ___ .||||||||||||| | . | | | . | | ||||||||||||: |___|_|_|_|___| _/| |||||||||||||:_=---.._ | | |||||:'''':|| '~-._ '-. _/| | ||' '-._ _: ; | | | ' '~~ _; | ' _.=._ _-~ _.~ { '-_' _.--=.-~ _.._ {_ } _.-~ @-, { '-._ _. '~==+ | (' } \_ \_.=~ | | `=======' /_ ~-_ ) (_oo_) `-----~~/ /'===...===' + / (_oo_) / // / // (_oo_)
Say hello to Dino.
$ npm install artillery-dino
$ dino setup -r $role_arn # see below
$ dino -n 500 -c 10 -l 20 -t http://indestructible.io/
Dino lets you run large scale load tests from AWS Lambda. It’s an experimental project based on Artillery.
Large scale? Up to 100 lambdas can be spun up, each sending 500-1000 RPS for 50k-100k RPS in total.
Experimental? Dino has a very limited feature-set right now - think distributed ab
/wrk
(or Bees With Machine Guns) rather than an advanced load-generator like Artillery or JMeter. The goal is to run full Artillery on Lambda (at which point Dino will be merged into the Artillery CLI).
Dino in a nutshell:
artillery-core
- hacked up and transpiled to ES5 with Babel in order to run on Lambda.artillery-core
which actually runs it. As stats come back from artillery-core
, the lambda pushes them as messages onto an SQS queue via SNS.Here’s a dinogram to illustrate:
Dino runs on AWS Lambda, so you need to have an AWS account. (AWS Lambda comes with a rather generous free tier which would let you run quite a few large tests for free.) To get Dino set up, you’ll need to set up an IAM User and an IAM Role.
dino_cli
~/.aws/credentials
:
[dino]
aws_access_key_id=YOUR_KEY_ID_HERE
aws_secret_access_key=YOUR_ACCESS_KEY_HERE
dino_cli
and go to the Permissions tab and attach these policies:AmazonSQSFullAccess
AmazonLambdaFullAccess
AmazonSNSFullAccess
These will allow the Dino CLI to set up SNS/SQS for executing lambdas to communicate with the CLI as tests are running, and to create the lambda itself.
lambda_dino
AmazonSNSFullAccess
in the list of policiesOnce the IAM User is set up and your have the role ARN, run:
$ dino setup -r $ROLE_ARN
And once that completes, you’re ready to run some tests.
To see all options run dino run --help
:
$ dino run --help
Usage: bin/dino run [options] <target>
Options:
--help Show help [boolean]
-t target - target URL [string] [required]
-n requests - number of requests to send [number] [required]
-c connections - number of connections to open [number]
-l lambdas - number of lambdas to run (between 1 and 100)
[number] [required]
-k insecure - turn off TLS verification [boolean]
Run a test:
$ dino -n 1000 -c 10 -l 20 http://indestructible.io/
You can run as many as 100
lambdas concurrently - if you need more, you’ll need to contact AWS.
Dino basically lets you run a layer-7 DDoS attack. If you point it at any target that does not belong to you, you’d be behaving unethically and breaking the law. Misuse of Dino could result in prosecution and liability for any downtime caused.
Even if you only use Dino to test your own apps, get in touch with AWS if you’re going to run many large-scale tests to let them know. Otherwise your AWS account could get locked.
You have been warned. You are on your own - the authors of Dino / Artillery hold no responsibility for the result of any of your actions.