• Stars
    star
    153
  • Rank 243,323 (Top 5 %)
  • Language
    C++
  • Created almost 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

http(s)+h2 server load tester

hurl

HTTP Server Load Test utility written in C++

Table of Contents

Background

hurl is an http server load tester similar to ab/siege/weighttp/wrk with support for tls, http2, multithreading, parallelism, url ranges. hurl is primarily useful for benchmarking http server applications.

  • A little more about URLs Ranges: hurl has support for range expansion in urls which is useful for testing a server's capability to serve from many files. hurl will expand the ranges specified in the wildcards and perform requests in user configurable orders (see the "--mode" option in help). eg: "http://127.0.0.1:8089/[1-100]/my_[1-9]_file.html".

An example

>hurl "https://google.com" --calls=100 -p100 -f1000
Running 1 threads 100 parallel connections per thread with 100 requests per connection
+-----------/-----------+-----------+-----------+--------------+-----------+-------------+-----------+
| Completed / Requested |    IdlKil |    Errors | kBytes Recvd |   Elapsed |       Req/s |      MB/s |
+-----------/-----------+-----------+-----------+--------------+-----------+-------------+-----------+
|       572 /       665 |         0 |         0 |       334.43 |     1.00s |    1118.00s |     0.33s |
|      1000 /      1000 |         0 |         0 |       257.73 |     1.50s |     668.66s |     0.25s |
| RESULTS:             ALL
| fetches:             1000
| max parallel:        100
| bytes:               3.644410e+05
| seconds:             1.501000
| mean bytes/conn:     364.441000
| fetches/sec:         666.222518
| bytes/sec:           2.427988e+05
| HTTP response codes: 
| 200 -- 1000

Install

OS requirements:

Linux/OS X (kqueue support coming soon-ish)

Install dependencies:

Library requirements:

  • libssl/libcrypto (OpenSSL)

OS X Build requirements (brew)

brew install cmake
brew install openssl

Building the tools

./build_simple.sh

And optionally install

cd ./build
sudo make install

Usage

hurl --help

Usage: hurl [http[s]://]hostname[:port]/path [options]
Options are:
  -h, --help           Display this help and exit.
  -V, --version        Display the version number and exit.
  
Run Options:
  -4, --ipv4           Resolve name to IPv4 address.
  -6, --ipv6           Resolve name to IPv6 address.
  -w, --no_wildcards   Don't wildcard the url.
  -M, --mode           Request mode -if multipath [random(default) | sequential].
  -d, --data           HTTP body data -supports curl style @ file specifier
  -p, --parallel       Num parallel. Default: 100.
  -f, --fetches        Num fetches.
  -N, --calls          Number of requests per connection (or stream if H2)
  -1, --h1             Force http 1.x
  -t, --threads        Number of parallel threads. Default: 1
  -H, --header         Request headers -can add multiple ie -H<> -H<>...
  -X, --verb           Request command -HTTP verb to use -GET/PUT/etc. Default GET
  -l, --seconds        Run for <N> seconds.
  -s, --silent         Silent mode.
  -A, --rate           Max Request Rate -per sec.
  -T, --timeout        Timeout (seconds).
  -x, --no_stats       Don't collect stats -faster.
  -I, --addr_seq       Sequence over local address range.
  -S, --chunk_size_kb  Chunk size in kB -max bytes to read/write per socket read/write. Default 8 kB
  -F, --rand_xfwd      Generate a random X-Forwarded-For header per request)
  
TLS Settings:
  -y, --cipher         Cipher --see "openssl ciphers" for list.
  -O, --tls_options    SSL Options string.
  
Display Options:
  -v, --verbose        Verbose logging
  -c, --no_color       Turn off colors
  -C, --responses      Display http(s) response codes instead of request statistics
  -L, --responses_per  Display http(s) response codes per interval instead of request statistics
  -U, --update         Update output every N ms. Default 500ms.
  
Results Options:
  -j, --json           Display results in json
  -o, --output         Output results to file <FILE> -default to stdout
  
Debug Options:
  -r, --trace          Turn on tracing (error/warn/debug/verbose/all)
  
Note: If running long jobs consider enabling tcp_tw_reuse -eg:
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

Contribute

  • We welcome issues, questions and pull requests.

License

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to the LICENSE-2.0.txt file for the full terms.

More Repositories

1

vflow

Enterprise Network Flow Collector (IPFIX, sFlow, Netflow)
Go
1,087
star
2

waflz

multitenant ModSecurity compatible WAF engine from Edgio
C++
89
star
3

ectoken

Token Generator for Edgio Token-Based Authentication from Edgio
C
22
star
4

hyperion

Lightweight JSON specification from Edgecast
Go
13
star
5

tlsscan

TLS protocol scanner
C++
13
star
6

xtcp

A tool for extracting kernel TCP INET_DIAG data at high rates and exporting that data via protobufs
Go
12
star
7

terraform-provider-edgecast

Terraform Provider for Edgecast Platform
Go
11
star
8

edgio_caching_emulator

A web-caching policy emulator from Edgio.
C++
10
star
9

json_parser

Simple lightweight header-only JSON Parser from Edgio
C++
9
star
10

is2

embedded RESTy http(s) server library from Edgio
C++
7
star
11

icmpengine

Go
6
star
12

har-tools

A collection of tools for auditing HAR files and removing personally identifiable data.
JavaScript
5
star
13

rust-ectoken

Rust implementation of ectoken
Rust
4
star
14

frisky

Open source code scanner from Edgio
Python
4
star
15

py-ectoken

Python implementation of ectoken
Python
3
star
16

cs-ectoken

C# ectoken implementation
C#
2
star
17

ruby-ectoken

Ruby implementation of ectoken
Ruby
2
star
18

promts

TypeScript Native Prometheus Client for Deno
TypeScript
2
star
19

go-ectoken

golang implementation of ectoken
Go
2
star
20

ec-cli

Go
2
star
21

js-ectoken

JavaScript implementation of ectoken
JavaScript
2
star
22

test-ectoken

Interop tests for ectoken written in different langagues
Shell
1
star
23

perl-ectoken

Perl implementation of ectoken
Perl
1
star
24

java-ectoken

Java implementation of ectoken
1
star
25

tls-tester

Highly configurable tester for validating TLS server behavior.
1
star
26

functions_cookbook

Examples and cookbooks for the EdgeCast Functions@Edge product
1
star
27

Edge-Functions-Examples

JavaScript
1
star
28

php-ectoken

PHP implementation of ectoken
C
1
star
29

uplynk-api-tools

API implementation in tools
JavaScript
1
star
30

edgio-ai

A collection of sample AI projects for deploying large language models with Edgio
TypeScript
1
star
31

ec-sdk-go

EdgeCast Go SDK
Go
1
star