Coder Social home page Coder Social logo

coryt / goad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goadapp/goad

0.0 2.0 0.0 7.5 MB

Goad is an AWS Lambda powered, highly distributed, load testing tool

Home Page: https://goad.io

License: MIT License

Makefile 2.75% Go 96.48% JavaScript 0.76%

goad's Introduction

Goad

https://goad.io

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

Go + Load ⇒ Goad

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/goadapp/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)
  -H string
      HTTP Header to add to the request. This option can be set multiple times.

# 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

Running Goad will create the following AWS resources:

  • An IAM Role for the lambda function.
  • An IAM Role Policy that allows the lambda function to send messages to SQS and publish logs.
  • A lambda function.
  • An SQS queue for the test.

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.

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.

License & Copyright

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

See the LICENSE file for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.