Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A more flexible replacement for libevent's httpd API. PLEASE USE THE 'develop' BRANCH FOR PULL REQUESTS!
C CMake Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CMakeModules
build
contrib
evthr @ c9ca376
http_parser @ 1786fda
oniguruma @ 5def0ff
.gitmodules
CMakeLists.txt
ChangeLog
README
evhtp.c
evhtp.h
perftest.sh
test.c

README

Building:

1. git submodule init
2. git submodule update
3. cd build
4. cmake ..
5. make

Some ab benchmarks (100 connections, 5000 requests each):

Libevent http API (using test/bench_http)
-------------------------------------------------------------
$ for i in `seq 1 10`; do ab -k -n 5000 -c 100 http://localhost:8080/ref 2>&1 | grep "Requests per"; done
Requests per second:    37755.51 [#/sec] (mean)
Requests per second:    38672.75 [#/sec] (mean)
Requests per second:    38270.19 [#/sec] (mean)
Requests per second:    38472.78 [#/sec] (mean)
Requests per second:    38560.01 [#/sec] (mean)
Requests per second:    37964.78 [#/sec] (mean)
Requests per second:    37844.38 [#/sec] (mean)
Requests per second:    38136.21 [#/sec] (mean)
Requests per second:    38027.44 [#/sec] (mean)
Requests per second:    38316.23 [#/sec] (mean)

Libevhtp API (using test.c)
-------------------------------------------------------------
$ for i in `seq 1 10`; do ab -k -n 5000 -c 100 http://localhost:8081/ref 2>&1 | grep "Requests per"; done
Requests per second:    51516.12 [#/sec] (mean)
Requests per second:    44017.96 [#/sec] (mean)
Requests per second:    62221.56 [#/sec] (mean)
Requests per second:    60316.54 [#/sec] (mean)
Requests per second:    62998.48 [#/sec] (mean)
Requests per second:    63318.39 [#/sec] (mean)
Requests per second:    63430.85 [#/sec] (mean)
Requests per second:    62963.57 [#/sec] (mean)
Requests per second:    62072.48 [#/sec] (mean)
Requests per second:    57326.30 [#/sec] (mean)

Libevhtp API with evthr enabled and 4 workers (using test.c)
-------------------------------------------------------------
$ for i in `seq 1 10`; do ab -k -n 5000 -c 100 http://localhost:8081/ref 2>&1 | grep "Requests per"; done
Requests per second:    105307.50 [#/sec] (mean)
Requests per second:    104532.53 [#/sec] (mean)
Requests per second:    103790.43 [#/sec] (mean)
Requests per second:    104375.42 [#/sec] (mean)
Requests per second:    102549.38 [#/sec] (mean)
Requests per second:    104064.77 [#/sec] (mean)
Requests per second:    104019.31 [#/sec] (mean)
Requests per second:    104839.39 [#/sec] (mean)
Requests per second:    102859.49 [#/sec] (mean)
Requests per second:    102398.17 [#/sec] (mean)
Something went wrong with that request. Please try again.