WebServer Benchmark – Gatling VS Nginx

Gatling is a high performance web server, developed by this guy. This webserver in my opinion is very light, but very fast. I benchmark against nginx and it runs faster.

I benchmark using Apache Benchmark, at 10 concurrency level. Here’s the result:

Gatling

Server Software

Gatling/0.11

Server Hostname

127.0.0.1

Server Port

10080

Document Path

/index.html

Document Length

151 bytes

Concurrency Level

10

Time taken for tests

2.057 seconds

Complete requests

20000

Failed requests

0

Write errors

0

Total transferred

7380000 bytes

HTML transferred

3020000 bytes

Requests per second

9722.32 [#/sec] (mean)

Time per request

1.029 [ms] (mean)

Time per request

0.103 [ms] (mean, across all concurrent requests)

Transfer rate

3503.45 [Kbytes/sec] received

Here’s the Nginx part

Server Software

nginx/0.6.32

Server Hostname

127.0.0.1

Server Port

80

Document Path

/index.html

Document Length

151 bytes

Concurrency Level

10

Time taken for tests

3.938 seconds

Complete requests

20000

Failed requests

0

Write errors

0

Total transferred

7240000 bytes

HTML transferred

3020000 bytes

Requests per second

5078.16 [#/sec] (mean)

Time per request

1.969 [ms] (mean)

Time per request

0.197 [ms] (mean, across all concurrent requests)

Transfer rate

1795.21 [Kbytes/sec] received

Gatling reach 9722.32 request per second while Nginx only reach 5078.16. I’ve only benchmark the static pages only, since I still cannot figure out how to Run CGI on Gatling. And Gatling send less HTTP header than Nginx.

I believe this server will add more option besides Nginx and Lighttpd for replacing Apache to serve website. And the small size will be perfect for embedded web server that run on device such as router or switch.