Goad 是一款由 AWS Lambda 提供动力的高度分布式负载测试工具
Goad is an AWS Lambda powered, highly distributed, load testing tool built in Go for the 2016 Gopher Gala.
Goad allows you to load test your websites from all over the world whilst costing you the tiniest fractions of a penny by using AWS Lambda in multiple regions simultaneously.
You can run Goad from your machine using your own AWS credentials. Goad will automatically create the AWS resources you need and execute your test, and display the results broken down by region. This way, you can see how fast your website is from the major regions of the world.
If you just want to try Goad out, visit the Goad.io website and enter the address of the site you want to test.
The easiest way is to download a pre-built binary from Goad.io or from the GitHub Releases page.
To build the Goad CLI from scratch, make sure you have a working Go 1.5 workspace (instructions), then:
go get:go get github.com/goadapp/goad
go get -u github.com/jteeuwen/go-bindata/...
make
Alternatively, run append osx, linux, or windows to just build for one platform, for example:
make osx
goad binary in the build folder…Goad will read your credentials from ~/.aws/credentials or from the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables (more info).
…
Note that sites such as https://google.com that employ redirects cannot be tested correctly at this time.
Goad supports to load settings stored in an ini file. It looks for a goad.ini file in the current working directory. Flags set on the command-line will be overwrite these settings.
[general]
#url = http://example.com/
timeout = 3600
concurrency = 10
requests = 1000
timelimit = 15
json-output = test-result.json
method = GET
body = Hello world
[regions]
us-east-1 ;N.Virginia
#us-east-2 ;Ohio
#us-west-1 ;N.California
#us-west-2 ;Oregon
eu-west-1 ;Ireland
#eu-central-1 ;Frankfurt
#ap-southeast-1 ;Singapore
#ap-southeast-2 ;Sydney
#ap-northeast-1 ;Tokyo
#ap-northeast-2 ;Seoul
#sa-east-1 ;Sao Paulo
[headers]
cache-control: no-cache
auth-token: YOUR-SECRET-AUTH-TOKEN
Goad can also be run as a Docker container which exposes the web API:
docker build -t goad .
docker run --rm -p 8080:8080 -e AWS_ACCESS_KEY_ID=<your key ID> -e AWS_SECRET_ACCESS_KEY=<your key> goad
You can then execute a load test using WebSocket:
ws://localhost:8080/goad?url=https://example.com&requests=1000&concurrency=10&timelimit=3600&timeout=15®ion[]=us-east-1®ion[]=eu-west-1
Goad takes full advantage of the power of Amazon Lambdas and Go's concurrency for distributed load testing. You can use Goad to launch HTTP loads from up to four AWS regions at once. Each lambda can handle hundreds of concurrent connections, we estimate that Goad should be able to achieve peak loads of up to 100,000 concurrent requests.
Running Goad will create the following AWS resources:
A new SQS queue is created for each test run, and automatically deleted after the test is completed. The other AWS resources are reused in subsequent tests.
Written in pure Go, Goad takes care of instantiating all the AWS resources, collecting results and displaying them. Interestingly, it contains the executable of the Lambda worker, which is also written in Go.
There is also a webapi version, which can be used to serve Goad as a web service. This streams the results using WebSockets.
AWS Lambda instances are bootstrapped using node.js but the actual work on the Lambda instances is performed by a Go process. The HTTP requests are distributed among multiple Lambda instances each running multiple concurrent goroutines, in order to achieve the desired concurrency level with high throughput.
MIT License.
Copyright 2016 Joao Cardoso, Matias Korhonen, Rasmus Sten, and Stephen Sykes.
Copyright 2016 Guido Serra OLX, a Naspers company.
Copyright 2017 Walter Marta, Clemens Wältken Edrans/OLX.
See the LICENSE file for more details.
暂无开放 Issues,或尚未同步最近议题。