Skip to content

huanguz0702/web-frameworks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Which is the fastest ?


Simple framework comparison



Build Status Chat with us License

Motivation

There are many frameworks, each one comes with its own advantages and drawbacks. The purpose of this project is to identify them and attempt to measure their differences (performance is only one metric).

What is a framework ?

A framework is a set of components working together. The main intention behind a framework is to facilitate (app or service) creation. The way a framework help any developer could vary from one to an other.

A majority of frameworks could be splitted in 2 parts :

  • full-stack meaning it provides all aspects (-stacks-) from data layer to sometimes deployment
  • micro meaning it provides only the routing part, and let the developer choose any other component for the others

Requirements

  • ruby, all tools are made in ruby
  • wrk, results are collected using wrk
  • postgresql, results are stored in postgresql
  • docker, each implementation is implemented in an isolated container
  • jq, processing docker metadata
  • docker-machine if you are on macos

Usage

  • Setup
bundle install
bundle exec rake config
  • Build

⚠️ On macos, you need to use docker-machine to allow docker usage for each framework ⚠️

docker-machine rm default --force
docker-machine create default
eval $(docker-machine env default)
export FRAMEWORK=php/lumen
cd ${FRAMEWORK} 
make -f .Makefile build 
  • Run
make -f ${FRAMEWORK}/.Makefile collect

⚠️ You need to be on the project main directory ⚠️

Results (2021-03-10)

Technical details
  • CPU : 8 Cores (AMD FX-8320E Eight-Core Processor)
  • RAM : 16 Gb
  • OS : Fedora
  • Docker version 20.10.0-rc1, build 5cc2396
    
Datatable Computed with https://github.com/wg/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 java (11) activej (4.0) 172 615.83 210 093.20 213 370.57
2 php (7.4) workerman (4.0) 148 394.68 178 247.00 182 907.60
3 go (1.16) gearbox (1.2) 120 856.29 124 715.10 124 444.98
4 php (7.4) mark (1.1) 120 699.35 135 092.07 137 388.56
5 go (1.16) fiber (2.5) 118 637.26 130 929.40 129 984.10
6 go (1.16) atreugo (11.6) 118 154.79 129 384.46 128 721.56
7 go (1.16) fasthttp (1.22) 116 265.63 130 110.08 130 592.86
8 nim (1.4) httpbeast (0.2) 116 194.12 145 329.58 147 989.01
9 go (1.16) gorouter-fasthttp (4.4) 115 625.81 127 803.55 126 981.75
10 go (1.16) router (1.3) 115 561.35 128 400.35 128 276.72
11 nim (1.4) whip (0.2) 113 450.86 140 434.14 143 666.37
12 java (11) restheart (5.3) 113 428.06 118 059.17 118 685.67
13 java (11) undertow (2.2) 111 808.83 136 680.68 138 517.60
14 javascript (14.16) nanoexpress (2.4) 110 904.17 141 439.01 144 766.50
15 clojure (1.1) donkey (0.5) 110 531.90 113 121.89 114 721.66
16 java (11) jooby (2.9) 109 328.45 135 433.24 140 013.96
17 kotlin (1.4) kooby (2.9) 109 267.74 136 412.44 141 336.03
18 javascript (14.16) sifrr (0.0) 108 321.20 136 833.12 140 589.11
19 java (11) rapidoid (5.5) 108 020.50 134 621.23 137 157.81
20 c (11) kore (3.3) 107 625.48 188 888.06 195 637.01
21 go (1.16) gorilla-mux (1.8) 107 596.20 104 299.44 108 755.09
22 java (11) light-4j (2.0) 106 251.92 132 257.48 135 419.32
23 java (11) vertx (4.0) 105 888.66 125 747.88 127 208.69
24 nim (1.4) jester (0.5) 105 607.16 130 859.67 134 000.39
25 java (11) vertx4web (4.0) 104 707.78 123 648.49 125 142.76
26 php (7.4) swoole (4.6) 100 000.19 126 444.42 129 348.17
27 crystal (0.36) toro (0.4) 99 286.23 122 022.49 122 932.04
28 crystal (0.36) spider-gazelle (4.2) 97 821.88 121 611.95 122 584.99
29 crystal (0.36) router.cr (0.2) 97 349.18 121 704.66 122 588.08
30 crystal (0.36) grip (4.0) 95 265.56 114 144.78 115 243.57
31 crystal (0.36) runcobo (1.0) 93 830.19 117 176.94 117 643.04
32 java (11) act (1.9) 93 806.34 114 684.67 117 564.12
33 crystal (0.36) kemal (0.27) 92 358.16 113 379.84 113 669.53
34 php (7.4) nano (0.0.9) 92 066.83 138 886.28 149 899.99
35 crystal (0.36) amber (0.36) 88 864.56 107 163.90 106 946.85
36 php (7.4) swoole-coroutine (4.6) 88 634.21 126 751.97 136 898.80
37 java (11) quarkus (1.12) 85 982.57 104 242.70 106 879.76
38 scala (2.13) akkahttp (10.2) 83 945.38 99 461.76 96 442.36
39 javascript (14.16) naturaljs-router (0.1.1) 82 515.88 97 203.32 99 383.81
40 go (1.16) gf (1.15) 82 106.24 89 839.30 91 903.56
41 go (1.16) rte (0.0) 81 037.89 82 101.29 84 128.40
42 go (1.16) clevergo (0.5) 80 630.52 82 066.64 84 145.44
43 go (1.16) echo (4.2) 80 030.89 81 240.58 83 022.87
44 go (1.16) httprouter (1.3) 79 069.08 80 078.58 81 720.55
45 go (1.16) gorouter (4.5) 78 683.05 83 283.34 84 376.31
46 go (1.16) gin (1.6) 78 473.85 82 439.31 83 952.73
47 php (7.4) simps (1.0) 78 388.93 106 438.09 115 672.24
48 crystal (0.36) athena (0.13) 77 242.94 85 704.61 80 282.22
49 go (1.16) aero (1.3) 76 951.10 77 812.73 79 517.00
50 go (1.16) violetear (7.0) 76 792.28 77 029.69 78 896.27
51 go (1.16) chi (1.5) 76 259.90 75 319.90 77 664.51
52 go (1.16) webgo (5.0) 75 638.76 75 340.18 77 368.03
53 scala (2.13) finatra (21.1) 75 067.74 86 985.68 87 397.14
54 go (1.16) kami (2.2) 74 894.24 78 977.55 79 489.49
55 c (11) agoo-c (0.7) 73 970.00 108 118.68 135 103.30
56 go (1.16) goroute (0.0) 73 017.82 71 735.32 74 250.64
57 python (3.9) falcon (2.0) 72 864.58 79 354.57 82 114.44
58 fsharp (5.0) frank (6.2) 72 322.32 83 742.67 86 312.30
59 csharp (8.0) aspnetcore (5.0) 72 226.47 83 488.43 85 683.29
60 cpp (11) drogon (1.4) 71 974.65 67 725.45 56 628.00
61 go (1.16) beego (1.12) 71 722.82 74 442.08 76 323.93
62 fsharp (5.0) falco (3.0) 71 012.69 82 280.68 84 534.14
63 go (1.16) goyave (3.7) 70 567.34 70 935.30 73 273.03
64 javascript (14.16) low-http-server (2.1) 69 824.03 79 331.73 79 008.06
65 csharp (8.0) carter (5.2) 64 664.71 72 034.66 72 552.32
66 go (1.16) air (0.21) 64 575.18 63 422.27 65 710.70
67 javascript (14.16) polkadot (1.0) 63 144.60 68 854.22 70 406.40
68 fsharp (5.0) saturn (0.14) 61 754.03 67 526.09 67 172.70
69 java (11) spring (2.4) 61 490.33 64 433.00 65 402.11
70 scala (2.13) finch (0.32) 60 517.38 67 449.16 67 355.56
71 javascript (14.16) 0http (3.0) 60 318.65 65 881.01 67 589.79
72 javascript (14.16) restana (4.7) 56 512.78 63 097.86 64 146.78
73 swift (5.3) hummingbird (0.6) 55 155.94 60 788.28 61 252.53
74 javascript (14.16) polka (0.5) 55 049.66 60 631.79 60 593.89
75 javascript (14.16) rayo (1.3) 54 981.93 60 321.85 59 211.32
76 javascript (14.16) fastify (3.13) 54 070.95 58 949.51 57 505.84
77 elixir (1.11) cowboy_stream (2.8) 53 912.54 56 941.83 55 192.22
78 rust (1.50) salvo (0.7) 53 390.16 57 393.51 58 336.83
79 kotlin (1.4) http4k (3.275) 52 712.17 60 911.10 63 584.66
80 python (3.9) pyramid (2.0) 52 673.06 56 042.85 56 149.52
81 javascript (14.16) muneem (2.4) 52 457.15 58 497.04 56 770.93
82 ruby (3.0) agoo (2.14) 52 065.38 72 327.25 80 260.12
83 swift (5.3) perfect (3.1) 51 075.21 56 550.10 63 349.64
84 rust (1.50) actix (3.3) 50 638.98 46 079.50 46 680.35
85 java (11) javalin (3.9) 50 604.27 54 378.81 54 551.77
86 php (7.4) hyperf (2.1) 50 385.35 59 208.49 66 133.45
87 java (11) spark (2.9) 49 917.15 54 430.41 55 578.35
88 kotlin (1.4) ktor (1.4) 49 888.27 65 788.34 69 121.16
89 java (11) micronaut (1.2) 49 600.93 57 301.27 57 388.63
90 fsharp (5.0) websharper (4.7) 49 285.18 55 371.48 55 755.19
91 php (7.4) one (2.2) 49 108.96 58 353.40 68 418.68
92 javascript (14.16) nestjs-fastify (7.6) 48 121.36 51 756.43 50 889.28
93 go (1.16) mars (1.0) 46 356.82 46 499.76 49 700.18
94 javascript (14.16) iotjs-express (0.0) 45 841.59 49 207.79 47 472.00
95 haskell (8.8) scotty (0.12) 45 783.23 48 850.15 51 568.08
96 javascript (14.16) foxify (0.1) 45 541.44 49 029.19 47 719.27
97 clojure (1.1) coast (1.0) 44 565.76 45 402.54 45 972.58
98 python (3.9) bottle (0.12) 43 046.73 46 189.60 46 724.84
99 r (4.0) rserve (1.7) 42 927.18 32 717.89 31 761.34
100 javascript (14.16) koa (2.13) 40 785.74 43 590.14 42 527.52
101 python (3.9) asgineer (0.8) 40 207.81 44 835.57 45 756.63
102 dart (2.12) aqueduct (3.3) 39 102.45 38 628.36 37 860.74
103 javascript (14.16) fyrejet-uwebsockets (3.0) 38 583.00 40 398.74 59 601.65
104 swift (5.3) vapor (4.41) 36 603.27 38 225.01 37 927.82
105 elixir (1.11) cowboy (2.8) 36 151.35 37 457.03 37 690.88
106 php (7.4) chubbyphp-workerman (3.4) 35 145.42 36 889.96 37 644.80
107 javascript (14.16) hapi (20.1) 34 808.24 35 817.30 34 587.60
108 swift (5.3) kitura (2.9) 34 775.08 34 561.31 34 843.25
109 python (3.9) emmett (2.2) 34 332.57 41 184.28 41 803.58
110 javascript (14.16) moleculer (0.14) 34 329.10 35 495.83 34 736.27
111 java (11) jersey3-grizzly2 (3) 34 159.27 38 959.40 38 396.14
112 php (7.4) siler-swoole (1.7) 33 842.27 42 593.80 45 664.77
113 swift (5.3) kitura-nio (2.9) 33 801.33 34 110.51 34 184.91
114 cpp (11) evhtp (1.2) 33 263.10 34 162.92 33 176.95
115 python (3.9) hug (2.6) 33 222.36 35 036.61 53 664.67
116 java (11) jersey-grizzly2 (2.33) 33 164.75 37 840.04 37 194.93
117 javascript (14.16) fyrejet (3.0) 32 933.92 36 157.17 35 732.22
118 scala (2.13) http4s (0.21) 32 413.10 37 010.94 37 284.19
119 python (3.9) apidaora (0.28) 32 055.96 38 856.92 39 073.19
120 python (3.9) sanic (20.12) 31 354.17 34 731.04 35 082.92
121 rust (1.50) nickel (0.11) 31 314.74 32 681.24 29 513.18
122 fsharp (5.0) suave (2.6) 30 991.76 29 116.01 25 096.03
123 python (3.9) blacksheep (1.0) 29 859.47 33 774.70 34 277.41
124 javascript (14.16) restify (8.5) 29 290.39 30 595.06 29 384.85
125 csharp (8.0) simplify.web (4.2) 28 910.45 32 028.60 31 711.60
126 php (7.4) imi (1.2) 28 331.17 32 628.83 33 119.56
127 scala (2.13) play (2.8) 28 001.73 29 569.49 29 583.94
128 python (3.9) starlette (0.14) 27 688.92 31 407.21 32 372.93
129 php (7.4) yii-swoole (2.0) 27 549.77 30 987.08 32 553.98
130 elixir (1.11) plug (1.11) 27 289.95 28 970.08 28 544.30
131 rust (1.50) gotham (0.5) 27 031.85 29 956.94 30 866.51
132 php (7.4) comet (1.2) 27 024.35 27 396.46 26 688.38
133 python (3.9) index.py (0.16) 25 562.99 29 841.93 30 521.28
134 crystal (0.36) orion (3.0) 24 817.66 24 318.49 23 729.17
135 python (3.9) responder (2.0) 24 664.17 32 276.67 31 304.23
136 elixir (1.11) phoenix (1.5) 24 293.63 26 176.67 25 707.30
137 haskell (8.8) servant (0.17) 22 693.19 21 496.76 20 670.71
138 clojure (1.1) luminus (3.98) 22 402.68 21 784.39 21 221.20
139 crystal (0.36) shivneri (0.17) 21 842.36 21 919.97 19 515.05
140 python (3.9) clastic (19.9) 21 659.43 23 971.41 26 191.87
141 fsharp (5.0) giraffe (4.1) 21 632.95 22 087.12 22 147.73
142 nim (1.4) mike (0.5) 20 471.17 20 089.25 20 366.55
143 python (3.9) aiohttp (3.7) 20 075.70 23 468.60 23 968.03
144 python (3.9) molten (1.0) 19 094.91 22 463.92 22 262.17
145 javascript (14.16) turbo_polka (0.3) 18 265.29 17 419.52 16 405.56
146 nim (1.4) akane (0.1) 17 311.37 15 510.42 14 446.49
147 php (7.4) swoft (2.0) 16 918.30 20 585.66 20 866.38
148 ruby (3.0) hanami-api (0.1) 16 761.31 16 363.60 15 942.00
149 python (3.9) fastapi (0.63) 16 583.26 21 290.63 21 603.38
150 rust (1.50) iron (0.6) 16 354.98 16 627.39 16 444.44
151 ruby (3.0) syro (3.2) 16 224.16 15 699.92 15 445.28
152 nim (1.4) rosencrantz (0.4) 15 847.56 14 059.56 13 117.77
153 php (7.4) chubbyphp-swoole (3.4) 15 636.41 18 260.07 18 663.17
154 javascript (14.16) express (4.17) 15 523.01 17 772.31 17 631.75
155 ruby (3.0) roda (3.41) 15 348.29 14 846.78 14 685.63
156 javascript (14.16) feathersjs (4.5) 15 309.79 17 599.50 17 394.37
157 go (1.16) macaron (1.4) 15 284.18 16 760.26 16 808.74
158 php (7.4) sw-fw-less (preview) 15 213.83 17 605.58 18 070.07
159 php (7.4) slim-swoole (4.7) 15 024.46 17 383.06 17 747.33
160 ruby (3.0) cuba (3.9) 14 080.54 13 633.38 13 470.67
161 swift (5.3) swifter (1.5) 13 932.52 14 754.55 20 017.57
162 java (11) struts2 (2.5) 13 766.97 13 995.08 14 035.10
163 ruby (3.0) rack-routing (0.0) 13 688.22 13 394.74 13 080.59
164 java (11) blade (2.0) 13 261.73 15 554.41 14 505.27
165 ruby (3.0) camping (2.1) 12 965.21 12 490.18 12 313.03
166 ruby (3.0) rack_app (7.7) 12 770.28 12 092.40 11 863.75
167 python (3.9) flask (1.1) 12 686.98 14 396.86 13 089.87
168 javascript (14.16) nestjs-express (7.6) 11 547.29 11 488.63 14 090.38
169 go (1.16) tango (0.6) 11 384.95 11 698.63 11 715.71
170 dart (2.12) start (0.4) 11 141.84 11 013.98 10 672.81
171 python (3.9) cherrypy (18.6) 10 263.32 9 929.62 9 642.36
172 php (7.4) chubbyphp-roadrunner (3.4) 10 073.35 10 306.44 10 416.24
173 go (1.16) gramework (1.7) 9 926.91 10 122.75 10 129.42
174 php (7.4) sunrise-router-roadrunner (2.6) 9 813.66 9 968.96 10 182.33
175 php (7.4) slim-roadrunner (4.7) 9 717.94 9 914.27 10 017.71
176 php (7.4) spiral (2.7) 9 697.13 9 842.62 9 914.25
177 php (7.4) laravel-s-lumen (3.7) 9 594.35 9 934.55 9 724.64
178 python (3.9) guillotina (6.2) 9 076.78 9 398.42 8 894.83
179 ruby (3.0) sinatra (2.1) 8 598.81 8 348.59 8 333.45
180 pony (0.39) jennet (0.1) 8 363.85 13 365.85 12 638.68
181 ruby (3.0) grape (1.5) 7 592.63 7 380.46 7 356.21
182 python (3.9) quart (0.14) 7 576.66 7 262.92 6 832.35
183 python (3.9) tonberry (0.2) 7 395.60 6 948.86 6 348.29
184 php (7.4) phalcon (4.1) 7 182.67 7 485.89 7 481.62
185 php (7.4) basicphp (0.9) 7 095.68 7 529.16 7 393.25
186 php (7.4) fastsitephp (1.4) 7 038.85 7 234.47 7 239.83
187 php (7.4) siler (1.7) 6 790.06 7 168.45 7 078.47
188 php (7.4) laravel-s-laravel (3.7) 6 403.63 6 409.97 6 322.56
189 php (7.4) ice (1.5) 6 384.64 6 725.16 6 704.88
190 python (3.9) django (3.1) 6 198.90 5 835.09 5 746.99
191 clojure (1.1) yada (1.2) 5 991.23 6 764.83 6 513.46
192 php (7.4) ubiquity (2.3) 5 851.40 5 948.96 5 855.13
193 python (3.9) tornado (6.1) 5 795.89 5 966.89 5 623.56
194 php (7.4) one-fpm (2.2) 5 089.07 5 264.94 5 253.85
195 php (7.4) fatfree (3.7) 4 957.20 5 174.99 5 084.01
196 php (7.4) hamlet (3.2) 4 734.15 4 909.87 4 875.59
197 php (7.4) cubex (4.16) 4 678.96 4 841.44 4 821.19
198 php (7.4) slim (4.7) 4 377.63 4 530.61 4 528.42
199 javascript (14.16) sails (1.4) 4 214.82 4 214.02 4 153.02
200 php (7.4) bearframework (1.3) 4 097.65 4 279.74 4 259.70
201 julia (1.6) merly (1.0) 3 943.97 6 505.08 4 159.69
202 php (7.4) sunrise-router (2.6) 3 881.29 3 955.50 3 941.23
203 php (7.4) nette (3.1) 3 839.37 3 943.39 3 951.88
204 php (7.4) lumen (8.2) 3 833.71 3 889.30 3 904.63
205 php (7.4) chubbyphp (3.4) 3 460.20 3 570.98 3 561.05
206 php (7.4) symfony (5.2) 3 031.12 3 046.35 3 057.91
207 php (7.4) sunrise-router-annotations (2.6) 2 970.31 3 017.39 3 019.20
208 ruby (3.0) rails (6.1) 2 780.08 2 754.07 2 769.29
209 php (7.4) yii (2.0) 2 513.95 2 550.08 2 561.24
210 python (3.9) masonite (3.0) 2 438.59 2 478.19 2 476.38
211 php (7.4) antidot (0.2) 2 099.46 696.97 1 293.71
212 r (4.0) restrserve (0.3) 1 918.37 1 870.43 1 869.27
213 php (7.4) driftphp (0.1) 1 914.63 661.69 1 584.98
214 r (4.0) httpuv (1.5) 1 911.61 1 857.24 1 783.75
215 php (7.4) laminas (3.2) 1 720.48 1 734.95 1 733.42
216 python (3.9) cyclone (1.3) 1 592.82 1 588.07 1 564.75
217 python (3.9) klein (20.6) 1 491.97 1 520.48 1 500.71
218 perl (5.32) dancer2 (0.3) 1 370.14 661.87 389.66
219 python (3.9) django-ninja (0.11) 1 258.54 1 631.94 1 677.37
220 python (3.9) nameko (2.13) 1 214.75 1 168.97 1 181.42
221 php (7.4) codeigniter4 (4.1) 1 190.52 1 206.06 1 204.94
222 php (7.4) laravel (8.32) 993.48 994.32 988.17
223 php (7.4) unic (1.0) 549.41 498.23 159.59
224 r (4.0) plumber (1.0) 285.03 302.85 -94.91
225 cpp (11) nawa (0.6) 270.49 NaN NaN

About

Which is the fastest web framework?

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 63.5%
  • Ruby 5.4%
  • Python 3.6%
  • Java 3.3%
  • CMake 3.2%
  • Crystal 2.8%
  • Other 18.2%