goad

package
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, MIT Imports: 11 Imported by: 0

README

Goad

Goad is an AWS Lambda powered, highly distributed, load testing tool built in Go for the 2016 Gopher Gala.

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 ./build/osx/x86-64/goad:
  -c uint
      number of concurrent requests (default 10)
  -n uint
      number of total requests to make (default 1000)
  -r string
      AWS region (default "us-east-1")
  -t uint
      request timeout in seconds (default 15)

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

How it works

Goad takes full advantage of the power of Amazon Lambdas 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 requests/second.

Goad diagram

How it was built

Go CLI and server
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

Because we we wanted to use React and ES6 to build the online demo, we opted to use a Node.js-based toolchain for the website. 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…

We use 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
	Region         string
}

TestConfig type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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