I benchmarked kemal on my laptop and I'm getting only 5000 req/s for a hello world application. Building in release mode results in about 7200 req/s.
require "moonshine"
require "json"
include Moonshine
include Moonshine::Utils::Shortcuts
app = App.new
app.get "/api/v1/ping", do |request|
ok({:ping => "pong"}.to_json)
end
port = ENV.has_key?("PORT") ? ENV["PORT"] : "5000"
app.run(port.to_i)
$ crystal --version
Crystal 0.10.1 (Fri Jan 8 21:13:35 UTC 2016)
$ uname -s
Darwin
$ crystal build kemal.cr -o bin/kemal
$ bin/kemal -p 5000
$ wrk -c 800 -t 100 -d20s http://127.0.0.1:5000/api/v1/ping
Running 20s test @ http://127.0.0.1:5000/api/v1/ping
100 threads and 800 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 8.09ms 55.57ms 1.61s 98.71%
Req/Sec 544.39 484.16 3.21k 68.63%
101412 requests in 20.10s, 9.96MB read
Socket errors: connect 0, read 517, write 0, timeout 76
Requests/sec: 5044.91
Transfer/sec: 507.45KB
$ crystal build --release kemal.cr -o bin/kemal
$ bin/kemal -p 5000
$ wrk -c 800 -t 100 -d20s http://127.0.0.1:5000/api/v1/ping
Running 20s test @ http://127.0.0.1:5000/api/v1/ping
100 threads and 800 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 8.20ms 68.49ms 1.84s 98.82%
Req/Sec 0.94k 789.94 6.55k 71.84%
146596 requests in 20.10s, 14.40MB read
Socket errors: connect 0, read 17, write 0, timeout 126
Requests/sec: 7294.91
Transfer/sec: 733.77KB
$ crystal build moonshine.cr -o bin/moonshine
$ ./bin/moonshine
$ wrk -c 800 -t 100 -d20s http://127.0.0.1:5000/api/v1/ping
Running 20s test @ http://127.0.0.1:5000/api/v1/ping
100 threads and 800 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 57.72ms 10.70ms 108.12ms 75.91%
Req/Sec 132.25 41.11 0.91k 73.79%
262255 requests in 20.10s, 21.01MB read
Socket errors: connect 0, read 623, write 0, timeout 0
Requests/sec: 13044.96
Transfer/sec: 1.05MB
$ cr build --release moonshine.cr -o bin/moonshine
$ ./bin/moonshine
$ wrk -c 800 -t 100 -d20s http://127.0.0.1:5000/api/v1/ping
Running 20s test @ http://127.0.0.1:5000/api/v1/ping
100 threads and 800 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 39.22ms 6.82ms 103.44ms 78.84%
Req/Sec 198.26 36.60 480.00 69.29%
395779 requests in 20.10s, 31.71MB read
Socket errors: connect 0, read 423, write 0, timeout 0
Requests/sec: 19690.01
Transfer/sec: 1.58MB
$ PORT=5000 WEB_CONCURRENCY=1 puma -C config/puma.rb
$ wrk -c 800 -t 100 -d20s http://127.0.0.1:5000/api/v1/ping
Running 20s test @ http://127.0.0.1:5000/api/v1/ping
100 threads and 800 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.47ms 3.76ms 60.84ms 76.13%
Req/Sec 1.07k 111.97 1.25k 77.86%
43017 requests in 20.09s, 7.71MB read
Socket errors: connect 0, read 501, write 0, timeout 0
Requests/sec: 2140.76
Transfer/sec: 393.07KB