Coder Social home page Coder Social logo

hydra's Introduction

Hydra Distributed HTTP Benchmark Tool

Hydra is a Distributed HTTP Benchmark Tool capable of simulate thousands/ten of thousands users hitting your server as fast as it can.

It is the simplest distributed http benchmark tool you can find on the internet. No configuration need to run in multiples nodes.

Installation

Erlang

Hydra requires Erlang 18. You can download it here

Download

Download Hydra

$ wget https://github.com/luizbafilho/hydra/releases/download/v0.2/hydra
$ chmod +x hydra

Usage

To use Hydra, it very simple.

$ ./hydra http://www.example.com

That will run with default options, 10 concurrent users for 10 seconds.

Options

Usage: hydra [options] url
  Options:
    -u, --users    Number of concurrent users. Default: 10 users
    -t, --time     Duration of benchmark in seconds. Default: 10 seconds
    -m, --method   Defines the HTTP Method used. Default: GET
    -p, --payload  Sets a payload
    -H, --header   Extra header to include in the request. It can be called more than once.
        --nodes    Defines the slaves nodes to run a distributed benchmark. You can specify
                   as much nodes you want. Ex. --nodes 172.20.21.2,172.20.21.3
        --slave    Starts Hydra in Slave Mode.
        --inet     Option required when running in Slave Mode. It defines the ip address
                   that is accessible to the master node.
    -h, --help     Displays this help message

Distributed

First of all, make sure the epmd daemon is running. To do that run epmd -daemon. This daemon acts as a name server on all hosts involved in distributed Erlang computations.

To run a distributed benchmark, go to your slaves nodes and run Hydra in Slave Mode

$ hydra --slave --inet 172.20.1.1

The --inet options is required in order to enable the master node to reach the slave node.

Now, in the master node specify which slave node you want to join the benchmark.

$ hydra --nodes 172.20.1.1 http://www.example.com

That will spawn 10 users on each node (master and slaves).

Development

Elixir

Install Elixir in order to be able to build the project. Elixir Installation

Building

1 - Download the project

$ git clone [email protected]:luizbafilho/hydra.git

2 - Get the dependencies

$ mix deps.get

3 - Build the project

$ mix escript.build

After the last step, the binary will be avaliable inside the projects's bin directory.

hydra's People

Contributors

danxexe avatar luizbafilho avatar

Watchers

 avatar

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.