This project aims to be a load benchmarking suite, no more, no less
Measuring response times (routing times) for each framework (middleware).
Results are not production-ready yet
- Helping decide between languages, depending on use case
- Learning languages, best practices, devops culture ...
- Having fun ❤️
- Crystal as
built-in
tools are made in this language - Docker as frameworks are
isolated
into containers - wrk as benchmarking tool,
>= 4.1.0
- postgresql to store data,
>= 10
ℹ️ℹ️ℹ️ℹ️ℹ️
OSX
you need docker-machine
to use docker
containerization
brew install docker-machine
docker-machine create default
eval $(docker-machine env default)
ℹ️ℹ️ℹ️ℹ️ℹ️
- Install all dependencies
shards install
- Build internal tools
shards build
- Create and initialize the database
createdb -U postgres benchmark
psql -U postgres -d benchmark < .ci/dump.sql
Docker can be used to set up the database:
docker run -it --rm -d \
-p 5432:5432 \
-e POSTGRES_DB=benchmark \
-e POSTGRES_HOST_AUTH_METHOD=trust \
-v /tmp/pg-data:/var/lib/postgresql/data \
--name pg postgres:12-alpine
Wait several seconds for the container to start, then inject the dump:
docker exec pg sh -c "echo \"$(cat .ci/dump.sql)\" | psql -U postgres -d benchmark"
After creating the database, export its URL:
export DATABASE_URL="postgresql://postgres@localhost/benchmark"
- Make configuration
bin/make config
- Build containers
jobs are either languages (example : crystal) or frameworks (example : router.cr)
bin/neph [job1] [job2] [job3] ...
- Export all results readme
bin/db to_readme
ℹ️ Updated on 2020-06-27 ℹ️
Benchmarking with wrk
- Threads : 8
- Timeout : 8
- Duration : 15s (seconds)
ℹ️ Sorted by max req/s
on concurrency 64 ℹ️
Language | Framework | Speed (64) | Speed (256) | Speed (512) | |
---|---|---|---|---|---|
1 | nim (1.2) | httpbeast (0.2) | 190 340 | 202 659 | 202 115 |
2 | javascript (13.14) | sifrr (0.0) | 185 556 | 199 141 | 200 556 |
3 | nim (1.2) | whip (0.2) | 178 379 | 189 242 | 188 152 |
4 | php (7.4) | mark (1.0) | 174 491 | 187 228 | 187 387 |
5 | php (7.4) | simps (1.0) | 173 572 | 184 756 | 186 406 |
6 | go (1.14) | fasthttp (1.14) | 170 629 | 182 636 | 183 486 |
7 | javascript (13.14) | nanoexpress-pro (1.12) | 169 607 | 183 880 | 193 657 |
8 | crystal (0.35) | toro (0.4) | 166 822 | 174 088 | 172 099 |
9 | go (1.14) | router (1.2) | 165 390 | 175 802 | 181 657 |
10 | go (1.14) | fasthttprouter (0.1) | 165 226 | 175 439 | 180 839 |
11 | go (1.14) | atreugo (11.3) | 164 909 | 175 445 | 181 208 |
12 | kotlin (1.3) | kooby (2.8) | 164 741 | 189 938 | 188 712 |
13 | crystal (0.35) | router.cr (0.2) | 164 145 | 172 836 | 168 191 |
14 | go (1.14) | fiber (1.12) | 162 811 | 168 435 | 167 845 |
15 | go (1.14) | gorouter-fasthttp (4.4) | 160 943 | 171 941 | 165 275 |
16 | go (1.14) | gearbox (1.0) | 160 796 | 171 898 | 177 433 |
17 | crystal (0.35) | spider-gazelle (3.1) | 160 768 | 168 126 | 164 401 |
18 | java (8) | rapidoid (5.5) | 160 412 | 170 013 | 168 652 |
19 | java (8) | jooby (2.8) | 159 977 | 178 536 | 183 918 |
20 | php (7.4) | workerman (4.0) | 159 569 | 171 062 | 174 250 |
21 | crystal (0.35) | grip (0.28) | 154 926 | 160 505 | 155 110 |
22 | crystal (0.35) | kemal (0.26) | 153 401 | 159 820 | 155 448 |
23 | nim (1.2) | jester (0.4) | 146 832 | 156 438 | 156 132 |
24 | crystal (0.35) | amber (0.35) | 144 401 | 149 110 | 144 676 |
25 | crystal (0.35) | orion (2.3) | 139 020 | 142 597 | 137 564 |
26 | java (8) | act (1.8) | 126 456 | 140 114 | 140 106 |
27 | rust (1.44) | actix (2.0) | 125 365 | 128 679 | 131 417 |
28 | go (1.14) | rte (0.0) | 116 296 | 116 757 | 119 800 |
29 | go (1.14) | clevergo (0.3) | 116 040 | 116 608 | 121 773 |
30 | go (1.14) | httprouter (1.3) | 114 726 | 114 949 | 119 711 |
31 | go (1.14) | gin (1.6) | 112 375 | 116 756 | 120 932 |
32 | go (1.14) | gorouter (4.4) | 110 491 | 114 760 | 119 128 |
33 | go (1.14) | chi (4.1) | 110 370 | 109 293 | 113 872 |
34 | fsharp (4.7) | frank (6.1) | 109 234 | 119 027 | 120 177 |
35 | go (1.14) | aero (1.3) | 109 155 | 110 072 | 114 419 |
36 | go (1.14) | echo (4.1) | 108 087 | 101 923 | 107 155 |
37 | go (1.14) | violetear (7.0) | 107 650 | 107 541 | 112 111 |
38 | go (1.14) | goroute (0.0) | 106 658 | 104 746 | 109 153 |
39 | go (1.14) | webgo (4.1) | 106 580 | 104 470 | 110 965 |
40 | go (1.14) | kami (2.2) | 104 619 | 109 656 | 112 868 |
41 | ruby (2.7) | agoo (2.12) | 104 403 | 127 969 | 134 044 |
42 | go (1.14) | gorilla-mux (1.7) | 103 698 | 101 205 | 105 486 |
43 | go (1.14) | beego (1.12) | 103 696 | 106 841 | 111 503 |
44 | c (99) | kore (3.3) | 103 121 | 102 557 | 129 896 |
45 | csharp (8.0) | aspnetcore (3.1) | 102 599 | 114 350 | 119 325 |
46 | fsharp (4.7) | falco (1.2) | 98 081 | 104 710 | 110 802 |
47 | fsharp (4.7) | giraffe (4.1) | 98 008 | 102 873 | 102 266 |
48 | crystal (0.35) | athena (0.9) | 97 332 | 108 487 | 105 500 |
49 | php (7.4) | one (2.0) | 95 558 | 101 486 | 101 948 |
50 | javascript (13.14) | polkadot (1.0) | 95 505 | 104 561 | 105 243 |
51 | php (7.4) | hyperf (1.1) | 94 449 | 98 961 | 100 887 |
52 | javascript (13.14) | 0http (2.5) | 90 753 | 99 812 | 100 093 |
53 | cpp (14/17) | drogon (1.0) | 90 259 | 94 055 | 97 162 |
54 | go (1.14) | air (0.17) | 88 663 | 87 917 | 92 789 |
55 | kotlin (1.3) | ktor (1.2) | 84 731 | 99 768 | 101 446 |
56 | javascript (13.14) | polka (0.5) | 84 582 | 89 051 | 87 637 |
57 | javascript (13.14) | rayo (1.3) | 82 927 | 88 799 | 85 121 |
58 | scala (2.13) | akkahttp (10.1) | 81 531 | 89 184 | 85 867 |
59 | elixir (1.1) | cowboy_stream (2.8) | 79 852 | 80 159 | 78 281 |
60 | javascript (13.14) | restana (4.6) | 78 884 | 87 796 | 87 484 |
61 | csharp (8.0) | carter (5.1) | 78 599 | 78 030 | 70 996 |
62 | fsharp (4.7) | saturn (0.14) | 76 803 | 69 755 | 61 297 |
63 | swift (5.2) | perfect (3.1) | 76 597 | 85 970 | 91 847 |
64 | javascript (13.14) | muneem (2.4) | 73 777 | 78 485 | 77 110 |
65 | java (8) | javalin (3.9) | 73 356 | 77 832 | 78 185 |
66 | fsharp (4.7) | websharper (4.6) | 70 821 | 71 858 | 68 565 |
67 | c (11) | agoo-c (0.7) | 70 779 | 185 456 | 183 383 |
68 | go (1.14) | mars (1.0) | 69 146 | 68 496 | 72 008 |
69 | javascript (13.14) | foxify (0.1) | 69 066 | 72 840 | 71 305 |
70 | php (7.4) | siler-swoole (1.7) | 68 900 | 78 432 | 82 051 |
71 | javascript (13.14) | fastify (2.15) | 68 857 | 73 210 | 69 731 |
72 | go (1.14) | gf (1.13) | 67 824 | 72 300 | 82 353 |
73 | java (8) | spring-boot (2.3) | 67 066 | 73 372 | 72 632 |
74 | php (7.4) | comet (0.7) | 66 835 | 70 357 | 70 149 |
75 | java (8) | micronaut (1.2) | 66 794 | 73 387 | 73 539 |
76 | haskell (8.8) | scotty (0.12) | 64 000 | 66 971 | 72 644 |
77 | javascript (13.14) | koa (2.13) | 63 294 | 66 462 | 64 478 |
78 | python (3.8) | falcon (2.0) | 62 250 | 71 574 | 68 465 |
79 | swift (5.2) | kitura-nio (2.9) | 57 912 | 58 760 | 57 373 |
80 | python (3.8) | apidaora (0.26) | 56 940 | 61 646 | 63 167 |
81 | python (3.8) | bottle (0.12) | 56 529 | 58 590 | 58 678 |
82 | javascript (13.14) | express (4.17) | 55 699 | 57 636 | 56 067 |
83 | javascript (13.14) | feathersjs (4.5) | 55 678 | 57 656 | 56 892 |
84 | javascript (13.14) | iotjs-express (0.0) | 54 735 | 60 171 | 54 254 |
85 | javascript (13.14) | nestjs-fastify (7.2) | 54 552 | 62 441 | 61 252 |
86 | clojure (1.1) | coast (1.0) | 54 549 | 56 274 | 56 038 |
87 | java (8) | spring-framework (5.2) | 53 617 | 61 912 | 62 569 |
88 | rust (1.44) | nickel (0.11) | 51 880 | 51 313 | 51 918 |
89 | rust (1.44) | gotham (0.4) | 50 928 | 58 478 | 60 466 |
90 | scala (2.13) | http4s (0.21) | 50 149 | 52 746 | 51 080 |
91 | elixir (1.1) | cowboy (2.8) | 49 883 | 49 778 | 50 111 |
92 | swift (5.2) | kitura (2.9) | 49 811 | 46 623 | 44 192 |
93 | swift (5.2) | vapor (4.13) | 49 095 | 50 430 | 50 768 |
94 | python (3.8) | asgineer (0.7) | 47 796 | 53 236 | 53 290 |
95 | php (7.4) | imi (1.2) | 47 419 | 49 434 | 49 732 |
96 | python (3.8) | hug (2.6) | 46 738 | 48 016 | 48 914 |
97 | python (3.8) | blacksheep (0.2) | 46 285 | 54 397 | 53 964 |
98 | javascript (13.14) | moleculer (0.14) | 45 796 | 49 122 | 48 466 |
99 | javascript (13.14) | hapi (19.1) | 44 943 | 46 956 | 46 110 |
100 | cpp (11) | evhtp (1.2) | 43 967 | 44 488 | 44 491 |
101 | python (3.8) | pyramid (1.1) | 43 743 | 46 777 | 46 269 |
102 | javascript (13.14) | nestjs-express (7.2) | 43 136 | 45 153 | 44 007 |
103 | php (7.4) | yii-swoole (2.0) | 42 703 | 45 644 | 45 532 |
104 | php (7.4) | swoft (2.0) | 42 148 | 44 675 | 44 507 |
105 | elixir (1.1) | plug (1.10) | 42 077 | 42 323 | 42 428 |
106 | javascript (13.14) | restify (8.5) | 41 671 | 43 788 | 43 242 |
107 | python (3.8) | starlette (0.13) | 40 671 | 47 542 | 47 075 |
108 | ruby (2.7) | hanami-api (0.1) | 40 431 | 40 728 | 38 294 |
109 | fsharp (4.7) | suave (2.5) | 40 295 | 39 092 | 39 977 |
110 | ruby (2.7) | syro (3.2) | 39 857 | 41 330 | 39 513 |
111 | scala (2.13) | play (2.8) | 39 394 | 40 863 | 40 365 |
112 | python (3.8) | sanic (20.3) | 39 192 | 41 044 | 39 395 |
113 | csharp (8.0) | simplify.web (4.1) | 38 859 | 38 385 | 39 093 |
114 | php (7.4) | sw-fw-less (preview) | 38 420 | 40 747 | 40 777 |
115 | python (3.8) | emmett (2.0) | 37 610 | 42 177 | 41 913 |
116 | ruby (2.7) | roda (3.33) | 36 439 | 38 202 | 36 466 |
117 | elixir (1.1) | phoenix (1.5) | 35 744 | 36 198 | 36 472 |
118 | clojure (1.1) | luminus (1.0) | 34 183 | 35 130 | 35 022 |
119 | ruby (2.7) | cuba (3.9) | 33 701 | 34 765 | 33 602 |
120 | dart (2.8) | aqueduct (3.3) | 33 655 | 33 560 | 32 932 |
121 | haskell (8.8) | servant (0.17) | 30 879 | 30 179 | 28 972 |
122 | crystal (0.35) | shivneri (0.15) | 30 376 | 28 694 | 22 796 |
123 | python (3.8) | responder (2.0) | 29 624 | 31 297 | 30 924 |
124 | ruby (2.7) | rack-routing (0.0) | 29 012 | 29 110 | 28 487 |
125 | python (3.8) | fastapi (0.58) | 28 957 | 30 584 | 29 966 |
126 | ruby (2.7) | rack_app (7.6) | 28 676 | 28 876 | 28 205 |
127 | nim (1.2) | rosencrantz (0.4) | 28 118 | 23 911 | 21 762 |
128 | nim (1.2) | akane (0.1) | 26 743 | 23 358 | 20 966 |
129 | go (1.14) | macaron (1.3) | 26 113 | 28 321 | 28 551 |
130 | python (3.8) | molten (1.0) | 25 309 | 25 290 | 24 833 |
131 | ruby (2.7) | camping (2.1) | 24 981 | 24 830 | 24 483 |
132 | rust (1.44) | iron (0.6) | 24 153 | 24 347 | 24 400 |
133 | python (3.8) | clastic (19.9) | 23 860 | 26 158 | 25 575 |
134 | python (3.8) | aiohttp (3.6) | 23 555 | 26 257 | 26 131 |
135 | python (3.8) | flask (1.1) | 23 436 | 24 273 | 23 942 |
136 | javascript (13.14) | turbo_polka (0.3) | 23 394 | 22 741 | 21 575 |
137 | python (3.8) | masonite (2.3) | 22 204 | 23 296 | 23 311 |
138 | php (7.4) | spiral (2.4) | 18 892 | 19 303 | 19 444 |
139 | go (1.14) | tango (0.6) | 17 451 | 17 368 | 17 167 |
140 | java (8) | blade (2.0) | 17 437 | 20 351 | 19 240 |
141 | ruby (2.7) | sinatra (2.0) | 16 900 | 16 667 | 16 670 |
142 | ruby (2.7) | grape (1.3) | 15 779 | 15 512 | 15 485 |
143 | go (1.14) | gramework (1.7) | 15 055 | 15 438 | 15 410 |
144 | dart (2.8) | start (0.4) | 14 212 | 13 917 | 12 998 |
145 | php (7.4) | chubbyphp-roadrunner (3.0) | 14 122 | 15 316 | 15 567 |
146 | javascript (13.14) | sails (1.2) | 12 777 | 13 268 | 13 128 |
147 | crystal (0.35) | runcobo (0.2) | 12 354 | 12 302 | 11 880 |
148 | ruby (2.7) | flame (4.18) | 12 299 | 12 035 | 11 901 |
149 | python (3.8) | quart (0.12) | 11 728 | 11 797 | 11 308 |
150 | ruby (2.7) | hanami (1.3) | 11 552 | 11 497 | 11 404 |
151 | php (7.4) | fastsitephp (1.2) | 11 467 | 11 355 | 11 035 |
152 | swift (5.2) | swifter (1.4) | 11 364 | 11 366 | 11 345 |
153 | pony (0.35) | jennet (0.1) | 11 206 | 17 998 | 15 897 |
154 | python (3.8) | django (3.0) | 10 099 | 10 040 | 9 823 |
155 | python (3.8) | tornado (6.0) | 9 744 | 9 934 | 9 483 |
156 | php (7.4) | ubiquity (2.3) | 9 408 | 9 365 | 9 285 |
157 | java (8) | struts2 (2.5) | 8 785 | 9 040 | 9 716 |
158 | python (3.8) | cherrypy (18.6) | 8 622 | 8 616 | 9 113 |
159 | php (7.4) | phalcon (4.0) | 8 019 | 8 102 | 8 126 |
160 | php (7.4) | one-fpm (2.0) | 8 006 | 8 064 | 8 057 |
161 | php (7.4) | siler (1.7) | 7 740 | 7 788 | 7 718 |
162 | php (7.4) | hamlet (3.2) | 7 634 | 7 656 | 7 652 |
163 | python (3.8) | tonberry (0.2) | 6 822 | 6 059 | 5 322 |
164 | php (7.4) | ice (1.5) | 6 438 | 6 501 | 6 514 |
165 | php (7.4) | chubbyphp (3.0) | 5 708 | 5 720 | 5 914 |
166 | php (7.4) | slim (4.5) | 4 705 | 4 730 | 4 899 |
167 | php (7.4) | nette (3.0) | 4 378 | 4 425 | 4 544 |
168 | php (7.4) | lumen (7.2) | 4 307 | 4 348 | 4 463 |
169 | ruby (2.7) | rails (6.0) | 4 146 | 4 033 | 3 988 |
170 | php (7.4) | yii (2.0) | 4 125 | 4 201 | 4 312 |
171 | julia (1.5) | merly (0.2) | 3 311 | 8 087 | 6 405 |
172 | php (7.4) | symfony (5.1) | 3 188 | 3 239 | 3 290 |
173 | v (0.1) | vape (0.3) | 2 923 | 1 770 | 1 753 |
174 | php (7.4) | mezzio (3.2) | 2 854 | 2 912 | 2 976 |
175 | perl (5.32) | dancer2 (2.0) | 2 816 | 1 487 | 926 |
176 | python (3.8) | cyclone (1.3) | 2 455 | 2 459 | 2 442 |
177 | ruby (2.7) | pakyow (1.0) | 2 319 | 2 333 | 2 349 |
178 | python (3.8) | klein (20.6) | 1 629 | 1 641 | 1 627 |
179 | python (3.8) | nameko (2.12) | 1 479 | 1 444 | 1 416 |
180 | php (7.4) | laminas (3.1) | 1 445 | 1 461 | 1 482 |
181 | crystal (0.35) | lucky (0.22) | 1 209 | 1 226 | 1 237 |
182 | php (7.4) | laravel (7.17) | 855 | 176 | 3 935 |
183 | php (7.4) | basicphp (0.9) | 785 | 506 | 852 |
In any way you want ...
- Request a framework addition
- Report a bug (on any implementation)
- Suggest an idea
- ...
Any kind of idea is ❤️
- Taichiro Suzuki - Author | Maintainer
- OvermindDL1 - Maintainer
- Marwan Rabbâa - Maintainer