Module
A microframework for Deno's HTTP server with zero third-party dependencies
Benchmarks
The results below are the top-performing results out of three benchmark runs. Each benchmark was run against the “Hello World!” application of all frameworks listed. Deno Raw is the example from https://deno.land.
Table of Contents
- DigitalOcean Results
- Drash
- Express
- MacBook Pro Results
- Alosaur
- Deno Raw
- Dinatra
- Drash
- Express
- Oak
- Pogo
- MacBook Pro Results: Apache Reverse Proxy
- Deno Raw
- Dinatra
- Drash
- Express
- Oak
- Pogo
DigitalOcean Results
Configuration: DigitalOcean Droplet ($40/mo), Ubuntu 18.04.3 (LTS) x64, 2 vPCUs, 4GB Memory / 25GB SSD
Command Used:
autocannon -c 1024 -t30 drash.io
Drash
Running 10s test @ http://drash.io
1024 connections
┌─────────┬───────┬───────┬─────────┬─────────┬───────────┬───────────┬─────────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼─────────┼─────────┼───────────┼───────────┼─────────────┤
│ Latency │ 19 ms │ 23 ms │ 2734 ms │ 5548 ms │ 229.45 ms │ 922.53 ms │ 10036.16 ms │
└─────────┴───────┴───────┴─────────┴─────────┴───────────┴───────────┴─────────────┘
┌───────────┬─────────┬─────────┬────────┬────────┬────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼────────┼────────┼─────────┼─────────┤
│ Req/Sec │ 102 │ 102 │ 3759 │ 4815 │ 2814.2 │ 1853.72 │ 102 │
├───────────┼─────────┼─────────┼────────┼────────┼────────┼─────────┼─────────┤
│ Bytes/Sec │ 20.5 kB │ 20.5 kB │ 752 kB │ 962 kB │ 562 kB │ 370 kB │ 20.5 kB │
└───────────┴─────────┴─────────┴────────┴────────┴────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
28k requests in 10.2s, 5.62 MB read
Express
Running 10s test @ http://drash.io
1024 connections
┌─────────┬───────┬───────┬─────────┬─────────┬───────────┬──────────┬────────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼─────────┼─────────┼───────────┼──────────┼────────────┤
│ Latency │ 19 ms │ 22 ms │ 2508 ms │ 5409 ms │ 216.38 ms │ 886.7 ms │ 9935.07 ms │
└─────────┴───────┴───────┴─────────┴─────────┴───────────┴──────────┴────────────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼────────┼────────┼─────────┤
│ Req/Sec │ 139 │ 139 │ 2271 │ 4975 │ 2593.1 │ 1604.7 │ 139 │
├───────────┼─────────┼─────────┼────────┼─────────┼────────┼────────┼─────────┤
│ Bytes/Sec │ 38.9 kB │ 38.9 kB │ 633 kB │ 1.39 MB │ 723 kB │ 447 kB │ 38.9 kB │
└───────────┴─────────┴─────────┴────────┴─────────┴────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
26k requests in 10.2s, 7.23 MB read
2 errors (0 timeouts)
MacBook Pro Results
Configuration: MacBook Pro (Retina, 15-inch, Mid 2015), 2.5 GHz Quad-Core Intel Core i7, 16 GB 1600 MHz DDR Memory, 500GB SSD
Command Used:
autocannon -c40 -t30 localhost:1447
Alosaur
Running 10s test @ http://localhost:8000/home/html
40 connections
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬──────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼──────────┤
│ Latency │ 1 ms │ 1 ms │ 3 ms │ 4 ms │ 1.15 ms │ 0.73 ms │ 29.83 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴──────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 21759 │ 21759 │ 23567 │ 24063 │ 23441.6 │ 602.64 │ 21752 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.96 MB │ 1.96 MB │ 2.12 MB │ 2.17 MB │ 2.11 MB │ 54.3 kB │ 1.96 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
234k requests in 10.06s, 21.1 MB read
Deno Raw
Running 10s test @ http://localhost:1447
40 connections
┌─────────┬──────┬──────┬───────┬──────┬──────┬─────────┬──────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼──────┼─────────┼──────────┤
│ Latency │ 0 ms │ 1 ms │ 2 ms │ 2 ms │ 1 ms │ 0.37 ms │ 25.85 ms │
└─────────┴──────┴──────┴───────┴──────┴──────┴─────────┴──────────┘
┌───────────┬─────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 31791 │ 31791 │ 34943 │ 35295 │ 34687.2 │ 976.7 │ 31781 │
├───────────┼─────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.62 MB │ 1.62 MB │ 1.78 MB │ 1.8 MB │ 1.77 MB │ 49.9 kB │ 1.62 MB │
└───────────┴─────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
347k requests in 10.06s, 17.7 MB read
Dinatra
Running 10s test @ http://localhost:1447
40 connections
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬──────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼──────────┤
│ Latency │ 1 ms │ 2 ms │ 3 ms │ 4 ms │ 2.03 ms │ 0.51 ms │ 30.43 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴──────────┘
┌───────────┬────────┬────────┬────────┬────────┬─────────┬─────────┬────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼────────┼────────┼────────┼────────┼─────────┼─────────┼────────┤
│ Req/Sec │ 17679 │ 17679 │ 18511 │ 18847 │ 18372.8 │ 358.48 │ 17664 │
├───────────┼────────┼────────┼────────┼────────┼─────────┼─────────┼────────┤
│ Bytes/Sec │ 884 kB │ 884 kB │ 925 kB │ 942 kB │ 919 kB │ 17.9 kB │ 883 kB │
└───────────┴────────┴────────┴────────┴────────┴─────────┴─────────┴────────┘
Req/Bytes counts sampled once per second.
184k requests in 10.05s, 9.19 MB read
Drash
Running 10s test @ http://localhost:1447
40 connections
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬─────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼─────────┤
│ Latency │ 1 ms │ 1 ms │ 2 ms │ 3 ms │ 1.11 ms │ 0.48 ms │ 33.9 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴─────────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 23375 │ 23375 │ 25007 │ 25279 │ 24897.6 │ 544.77 │ 23372 │
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.78 MB │ 1.78 MB │ 1.9 MB │ 1.92 MB │ 1.89 MB │ 41.5 kB │ 1.78 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
249k requests in 10.06s, 18.9 MB read
Express
Running 10s test @ http://localhost:1447
40 connections
┌─────────┬──────┬──────┬───────┬──────┬────────┬─────────┬──────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼────────┼─────────┼──────────┤
│ Latency │ 1 ms │ 2 ms │ 4 ms │ 6 ms │ 1.9 ms │ 1.01 ms │ 36.63 ms │
└─────────┴──────┴──────┴───────┴──────┴────────┴─────────┴──────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 9399 │ 9399 │ 17999 │ 18655 │ 17020.41 │ 2637.26 │ 9393 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 2.03 MB │ 2.03 MB │ 3.89 MB │ 4.03 MB │ 3.68 MB │ 570 kB │ 2.03 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
170k requests in 10.05s, 36.8 MB read
Oak
Running 10s test @ http://localhost:1447
40 connections
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬──────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼──────────┤
│ Latency │ 2 ms │ 2 ms │ 3 ms │ 4 ms │ 2.08 ms │ 0.54 ms │ 35.29 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴──────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 15847 │ 15847 │ 16799 │ 17119 │ 16686 │ 450.97 │ 15841 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.46 MB │ 1.46 MB │ 1.55 MB │ 1.57 MB │ 1.54 MB │ 41.6 kB │ 1.46 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
167k requests in 10.06s, 15.4 MB read
Pogo
Running 10s test @ http://localhost:1447
40 connections
┌─────────┬──────┬──────┬───────┬──────┬─────────┬─────────┬──────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼──────┼──────┼───────┼──────┼─────────┼─────────┼──────────┤
│ Latency │ 1 ms │ 1 ms │ 5 ms │ 5 ms │ 1.23 ms │ 1.05 ms │ 32.29 ms │
└─────────┴──────┴──────┴───────┴──────┴─────────┴─────────┴──────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 20543 │ 20543 │ 21967 │ 22303 │ 21844.8 │ 477.75 │ 20539 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.89 MB │ 1.89 MB │ 2.02 MB │ 2.05 MB │ 2.01 MB │ 43.8 kB │ 1.89 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
218k requests in 10.06s, 20.1 MB read
MacBook Pro Results: Apache Reverse Proxy
Configuration: MacBook Pro (Retina, 15-inch, Mid 2015), 2.5 GHz Quad-Core Intel Core i7, 16 GB 1600 MHz DDR Memory, 500GB SSD
Command Used:
ab -n 250000 -c 100 -k http://denobenching.com/
Apache Virtual Host Configuration:
<VirtualHost *:80>
DocumentRoot "/usr/local/var/www/benchmarks"
ServerName denobenching.com
ProxyPreserveHost On
ProxyPass / http://localhost:1447
ProxyPassReverse / http://localhost:1447
</VirtualHost>
Results:
Deno Raw: Requests per second: 20316.51 [#/sec] (mean)
Dinatra: Requests per second: 13824.89 [#/sec] (mean)
Drash: Requests per second: 17145.15 [#/sec] (mean)
Express: Requests per second: 14255.08 [#/sec] (mean)
Oak: Requests per second: 12896.96 [#/sec] (mean)
Pogo: Requests per second: 15688.14 [#/sec] (mean)