goad

package module
v0.0.0-...-4cc87c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2016 License: MIT Imports: 14 Imported by: 0

README

Goad

https://goad.io

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, and it 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.

goad CLI interface

Installation

Binary

The easiest way is to download a pre-built binary from Goad.io or from the GitHub Releases page.

From source

To build the Goad CLI from scratch, make sure you have a working Go 1.5 workspace (instructions), then:

  1. Fetch the project with go get:
go get github.com/gophergala2016/goad
  1. Install Go bindata:
go get -u github.com/jteeuwen/go-bindata/...
  1. Run make to build for all supported platforms
make

Alternatively, run append osx, linux, or windows to just build for one platform, for example:

make osx
  1. You'll find your goad binary in the build folder…

Usage

AWS credentials

Goad will read your credentials from ~/.aws/credentials or from the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables (more info).

CLI
# Get help:
$ goad -h
Usage of goad:
  -c uint
      number of concurrent requests (default 10)
  -m string
      HTTP method (default "GET")
  -n uint
      number of total requests to make (default 1000)
  -r string
      AWS regions to run in (comma separated, no spaces) (default "us-east-1")
  -t uint
      request timeout in seconds (default 15)
  -u string
      URL to load test (required)

# For example:
$ goad -n 1000 -c 5 -u https://example.com

Note that sites such as https://google.com that employ redirects cannot be tested correctly at this time.

How it works

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.

Goad diagram

How it was built

Go CLI and server
Goad executable

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 the Goad.io website uses to execute its tests. This streams the results using WebSockets.

Lambda workers

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.

Goad.io site

We used React and ES6 to build the online demo, and we used a Node.js-based toolchain for the website. We wanted to use Go, but as far as we could tell none of static site builders built with Go have built in support for an asset pipeline that would support ES6 modules out of the box (or even easily). However, note that the website is mainly a demo and download location, and is not essential to use Goad.

The demo uses WebSockets and React to present the results of the demo load test every few seconds as more results come in.

As we wanted to prevent the site from being used as a DDoS tool, the online demo is very limited but hopefully enough to demonstrate the usefulness of the CLI version of Goad.

MIT License. Copyright 2016 Joao Cardoso, Matias Korhonen, Rasmus Sten, and Stephen Sykes.

See the LICENSE file for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Test

type Test struct {
	// contains filtered or unexported fields
}

Test type

func NewTest

func NewTest(config *TestConfig) (*Test, error)

NewTest returns a configured Test

func (*Test) Start

func (t *Test) Start() <-chan queue.RegionsAggData

Start a test

type TestConfig

type TestConfig struct {
	URL            string
	Concurrency    uint
	TotalRequests  uint
	RequestTimeout time.Duration
	Regions        []string
	Method         string
}

TestConfig type

Directories

Path Synopsis
Godeps
_workspace/src/github.com/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds
Package stscreds are credential Providers to retrieve STS AWS credentials.
Package stscreds are credential Providers to retrieve STS AWS credentials.
_workspace/src/github.com/aws/aws-sdk-go/aws/defaults
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata
Package ec2metadata provides the client for making API calls to the EC2 Metadata service.
Package ec2metadata provides the client for making API calls to the EC2 Metadata service.
_workspace/src/github.com/aws/aws-sdk-go/aws/session
Package session provides a way to create service clients with shared configuration and handlers.
Package session provides a way to create service clients with shared configuration and handlers.
_workspace/src/github.com/aws/aws-sdk-go/private/endpoints
Package endpoints validates regional endpoints for services.
Package endpoints validates regional endpoints for services.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil
Package jsonutil provides JSON serialisation of AWS requests and responses.
Package jsonutil provides JSON serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/jsonrpc
Package jsonrpc provides JSON RPC utilities for serialisation of AWS requests and responses.
Package jsonrpc provides JSON RPC utilities for serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query
Package query provides serialisation of AWS query requests, and responses.
Package query provides serialisation of AWS query requests, and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest
Package rest provides RESTful serialization of AWS requests and responses.
Package rest provides RESTful serialization of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/restjson
Package restjson provides RESTful JSON serialisation of AWS requests and responses.
Package restjson provides RESTful JSON serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
Package xmlutil provides XML serialisation of AWS requests and responses.
Package xmlutil provides XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4
Package v4 implements signing for AWS V4 signer
Package v4 implements signing for AWS V4 signer
_workspace/src/github.com/aws/aws-sdk-go/service/iam
Package iam provides a client for AWS Identity and Access Management.
Package iam provides a client for AWS Identity and Access Management.
_workspace/src/github.com/aws/aws-sdk-go/service/iam/iamiface
Package iamiface provides an interface for the AWS Identity and Access Management.
Package iamiface provides an interface for the AWS Identity and Access Management.
_workspace/src/github.com/aws/aws-sdk-go/service/lambda
Package lambda provides a client for AWS Lambda.
Package lambda provides a client for AWS Lambda.
_workspace/src/github.com/aws/aws-sdk-go/service/lambda/lambdaiface
Package lambdaiface provides an interface for the AWS Lambda.
Package lambdaiface provides an interface for the AWS Lambda.
_workspace/src/github.com/aws/aws-sdk-go/service/sqs
Package sqs provides a client for Amazon Simple Queue Service.
Package sqs provides a client for Amazon Simple Queue Service.
_workspace/src/github.com/aws/aws-sdk-go/service/sqs/sqsiface
Package sqsiface provides an interface for the Amazon Simple Queue Service.
Package sqsiface provides an interface for the Amazon Simple Queue Service.
_workspace/src/github.com/davecgh/go-spew/spew
Package spew implements a deep pretty printer for Go data structures to aid in debugging.
Package spew implements a deep pretty printer for Go data structures to aid in debugging.
_workspace/src/github.com/dustin/go-humanize
Package humanize converts boring ugly numbers to human-friendly strings and back.
Package humanize converts boring ugly numbers to human-friendly strings and back.
_workspace/src/github.com/go-ini/ini
Package ini provides INI file read and write functionality in Go.
Package ini provides INI file read and write functionality in Go.
_workspace/src/github.com/gorilla/websocket
Package websocket implements the WebSocket protocol defined in RFC 6455.
Package websocket implements the WebSocket protocol defined in RFC 6455.
_workspace/src/github.com/gorilla/websocket/examples/autobahn
Command server is a test server for the Autobahn WebSockets Test Suite.
Command server is a test server for the Autobahn WebSockets Test Suite.
_workspace/src/github.com/nsf/termbox-go
termbox is a library for creating cross-platform text-based interfaces
termbox is a library for creating cross-platform text-based interfaces
_workspace/src/github.com/pmezard/go-difflib/difflib
Package difflib is a partial port of Python difflib module.
Package difflib is a partial port of Python difflib module.
_workspace/src/github.com/satori/go.uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package uuid provides implementation of Universally Unique Identifier (UUID).
_workspace/src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
cli
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds
Package stscreds are credential Providers to retrieve STS AWS credentials.
Package stscreds are credential Providers to retrieve STS AWS credentials.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata
Package ec2metadata provides the client for making API calls to the EC2 Metadata service.
Package ec2metadata provides the client for making API calls to the EC2 Metadata service.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session
Package session provides a way to create service clients with shared configuration and handlers.
Package session provides a way to create service clients with shared configuration and handlers.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints
Package endpoints validates regional endpoints for services.
Package endpoints validates regional endpoints for services.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil
Package jsonutil provides JSON serialisation of AWS requests and responses.
Package jsonutil provides JSON serialisation of AWS requests and responses.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/jsonrpc
Package jsonrpc provides JSON RPC utilities for serialisation of AWS requests and responses.
Package jsonrpc provides JSON RPC utilities for serialisation of AWS requests and responses.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query
Package query provides serialisation of AWS query requests, and responses.
Package query provides serialisation of AWS query requests, and responses.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest
Package rest provides RESTful serialization of AWS requests and responses.
Package rest provides RESTful serialization of AWS requests and responses.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/restjson
Package restjson provides RESTful JSON serialisation of AWS requests and responses.
Package restjson provides RESTful JSON serialisation of AWS requests and responses.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
Package xmlutil provides XML serialisation of AWS requests and responses.
Package xmlutil provides XML serialisation of AWS requests and responses.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4
Package v4 implements signing for AWS V4 signer
Package v4 implements signing for AWS V4 signer
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/iam
Package iam provides a client for AWS Identity and Access Management.
Package iam provides a client for AWS Identity and Access Management.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/iam/iamiface
Package iamiface provides an interface for the AWS Identity and Access Management.
Package iamiface provides an interface for the AWS Identity and Access Management.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/lambda
Package lambda provides a client for AWS Lambda.
Package lambda provides a client for AWS Lambda.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/lambda/lambdaiface
Package lambdaiface provides an interface for the AWS Lambda.
Package lambdaiface provides an interface for the AWS Lambda.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/sqs
Package sqs provides a client for Amazon Simple Queue Service.
Package sqs provides a client for Amazon Simple Queue Service.
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/sqs/sqsiface
Package sqsiface provides an interface for the Amazon Simple Queue Service.
Package sqsiface provides an interface for the Amazon Simple Queue Service.
Godeps/_workspace/src/github.com/dustin/go-humanize
Package humanize converts boring ugly numbers to human-friendly strings and back.
Package humanize converts boring ugly numbers to human-friendly strings and back.
Godeps/_workspace/src/github.com/go-ini/ini
Package ini provides INI file read and write functionality in Go.
Package ini provides INI file read and write functionality in Go.
Godeps/_workspace/src/github.com/nsf/termbox-go
termbox is a library for creating cross-platform text-based interfaces
termbox is a library for creating cross-platform text-based interfaces
Godeps/_workspace/src/github.com/satori/go.uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package uuid provides implementation of Universally Unique Identifier (UUID).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL