Giter Site home page Giter Site logo

hb's Introduction

hb

hb is an endpoint focused HTTP load testing / benchmark tool.

Description

The goal of hb is to provide a simple, robust tool to apply load against an endpoint (or set of endpoints). For example, it could replay load against a web-server, or evaluate the performance of REST APIs. It does not attempt to model workflows or user journeys.

It is similar to many other tools such as:

Features

hb supports the following features:

  • a large number (millions) of URLs (i.e. can test multiple endpoints or resources)
  • variable load concurrency (i.e. N worker threads)
  • variable request rate (N/unit of time) with optional distribution (uniform, constant, negative exponential)
  • reports latency based on percentiles
  • tracks the slowest N percentile of requests, and dumps a report after the run

Future features include:

  • ability to replay from a load-balancer log file at a time scaling multiple (link)
  • track delays due to coordinated omission (link)

Why?

Why another load testing tool? In my experience, while excellent, the above tools have various problems:

  • ApacheBench reports are extremely useful, but it has a limited feature set (e.g. only a single URL or request)
  • siege supports multiple requests (e.g. calls to various REST services behind an LB), but appears to crash with large volumes of URLs or concurrent requests
  • wrk has a good mix of features but suffers from coordinated omission
  • wrk2 is a fantastic improvement on wrk, but has limited load generation mechanisms such as negative exponential delays

A new tool also provides an opportunity to use a modern language (Rust) to support multiple platforms easily, whilst maintaining security, reliability and performance.

Getting Started

Building

At the moment the only platform supported is Linux. Future releases will include pre-built artifacts for MacOS and Windows.

Linux, static build, x86_64

This uses a Docker container to build a statically linked binary that can be run on any reasonable x86_64 environment.

alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder'
rust-musl-builder cargo build --release

Compiling locally

To compile it locally you'll need following dependencies

  • pkg-config
  • libssl-dev

On a clean Ubuntu 20.04 system, they can be installed by running

sudo apt install pkg-config libssl-dev

Running

Execute ./hb -h to view usage.

License

This project is licensed under the MIT license.

Acknowledgments

My gratitude to my employer SEEK who provided time and hardware to build the initial version of this tool, and an environment where we can engage in interesting work and tackle cool problems.

hb's People

Contributors

markpritchard avatar renshao avatar

Watchers

James Cloos 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.