a benchmarking&stressing tool that can send raw HTTP requests



reqstress is a benchmarking&stressing tool that can send raw HTTP requests. It's written in Go and uses fasthttp library instead of Go's default http library, because of its lightning-fast performance.

Why Do We Need Another Benchmarking Tool?

There are really great benchmarking tools out there such as wrk, bombardier, hey, ab. Some of them don't support sending custom requests, they are only sending a GET request to a given URL. Some of them support custom requests but it's really hard to craft one by using command line parameters. I wanted to create a tool that can read a raw HTTP request from a text file and replays it.

So, you can copy your favorite request from Burp Suite, Fiddler etc. and pass it to the reqstresser directly. It would be useful for stressing authenticated endpoints and specific requests that create a huge load.

reqstress vs. Other Tools

reqstresser is not the fastest benchmarking tool, but it's not bad either. I tested couple of popular tools on a $20 Linode server with same amount of threads. Here is the result:

Tool Num. of Sent Requests Duration
wrk ~45000 10s
bombardier ~41000 10s
ab ~40000 10s
reqstress ~39304 10s
hey ~35127 10s
goldeneye.py ~10913 10s


From Binary

You can download the pre-built binaries from the releases page and run. For example:

wget https://github.com/utkusen/reqstress/releases/download/v0.1.3/reqstress_0.1.3_Linux_amd64.tar.gz

tar xzvf reqstress_0.1.3_Linux_amd64.tar.gz

./reqstress --help

From Source

  1. Install Go on your system
  2. Run: go get -u github.com/utkusen/reqstress


reqstress requires 6 parameters to run:

-r : Path of the request file. For example: -r request.txt. Request file should contain a raw HTTP request. For example:

POST /wp-login.php HTTP/1.1
Content-Length: 107
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: wordpress_test_cookie=WP%20Cookie%20check
Connection: close


-w : The number of workers to run. The default value is 500. You can increase or decrease this by testing out the capability of your system.

-d : Duration of the test (in seconds). Default is infinite.

-https : Target protocol. Can be true or false. Default is true

-t : Request timeout. Default is 5(seconds)

  • Multiple race conditions fixed, code refactored, timeout parameter added.

    Multiple race conditions fixed, code refactored, timeout parameter added.

    Hey :wave: Here are my changes.

    • There are multiple race condition bugs in sendRequest function. I have implemented two functions for safely incrementing the counters and time with using a mutex lock. (This is still not the proper way to colect values from multiple go routines, best way would be using signal channels for collecting values. But since this is a small project it would be overkill :smiley: )
    • Here you give a *fasthttp.Response (pointer) to each sendRequest function, thus they all write the response into the same struct :) So, moved the fasthttp.AcquireResponse() call into sendRequest function.
    • Refactored the code by fixing coding convention naming, removing unnecessary allocations and type casting.
    • Added a timeout parameter. This is a necessary feature because net/http and fasthttp by-default has no timeout on requests, thus it hangs forever.
    opened by EgeBalci 1
  • Mutex locks replaced with atomic addition

    Mutex locks replaced with atomic addition

    Atomic add should be much faster than mutex. But test this first!!

    opened by EgeBalci 1
  • Update README.md

    Update README.md

    Fixed some of the typos as well as formatting errors in the README.md

    opened by Arszilla 0
Utku Sen
Utku Sen
go-wrk - a HTTP benchmarking tool based in spirit on the excellent wrk tool (https://github.com/wg/wrk)

go-wrk - an HTTP benchmarking tool go-wrk is a modern HTTP benchmarking tool capable of generating significant load when run on a single multi-core CP

Tal Sliwowicz 441 Jun 6, 2021
Plow is a high-performance HTTP benchmarking tool with real-time web UI and terminal displaying

Plow is a HTTP(S) benchmarking tool, written in Golang. It uses excellent fasthttp instead of Go's default net/http due to its lightning fast performance.

ddc 307 Jun 20, 2021
HTTP load testing tool and library. It's over 9000!

Vegeta Vegeta is a versatile HTTP load testing tool built out of a need to drill HTTP services with a constant request rate. It can be used both as a

Tomás Senart 17.5k Jun 21, 2021
A bytecode-based virtual machine to implement scripting/filtering support in your golang project.

eval-filter Implementation Scripting Facilities Types Built-In Functions Conditionals Loops Functions Case/Switch Use Cases Security Denial of service

Steve Kemp 57 Jun 11, 2021
Stress testing and benchmarking tool for the NEAR EVM

evm-bully --- stress testing and benchmarking tool for the NEAR EVM

Project Aurora 29 Jun 11, 2021
Fast cross-platform HTTP benchmarking tool written in Go

bombardier bombardier is a HTTP(S) benchmarking tool. It is written in Go programming language and uses excellent fasthttp instead of Go's default htt

Максим Федосеев 2.7k Jun 11, 2021
http integration test framework

go-hit hit is an http integration test framework written in golang. It is designed to be flexible as possible, but to keep a simple to use interface f

Tobias Salzmann 34 Jun 7, 2021
API testing framework inspired by frisby-js

frisby REST API testing framework inspired by frisby-js, written in Go Proposals I'm starting to work on frisby again with the following ideas: Read s

_Hofstadter 265 Feb 12, 2021
:octocat: ghdag is a tiny workflow engine for GitHub issue and pull request.

ghdag ghdag is a tiny workflow engine for GitHub issue and pull request. Key features of ghdag are: Simple definition of workflows to improve the life

Ken’ichiro Oyama 13 May 29, 2021
Framework of performance testing

Framework of performance testing fperf is a powerful and flexible framework which allows you to develop your own benchmark tools so much easy. You cre

null 321 May 29, 2021
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.

Fortio Fortio (Φορτίο) started as, and is, Istio's load testing tool and now graduated to be its own project. Fortio is also used by, among others, Me

Fortio (Φορτίο) 1.9k Jun 14, 2021
Record and replay your HTTP interactions for fast, deterministic and accurate tests

go-vcr go-vcr simplifies testing by recording your HTTP interactions and replaying them in future runs in order to provide fast, deterministic and acc

Marin Atanasov Nikolov 609 Jun 18, 2021
End-to-end HTTP and REST API testing for Go.

httpexpect Concise, declarative, and easy to use end-to-end HTTP and REST API testing for Go (golang). Basically, httpexpect is a set of chainable bui

Victor Gaydov 1.7k Jun 12, 2021
Learn Go with test-driven development

Learn Go with Tests Art by Denise Formats Gitbook EPUB or PDF Translations 中文 Português 日本語 한국어 Support me I am proud to offer this resource for free,

Chris James 14.5k Jun 12, 2021