Which is the fastest web framework?

Last update: Aug 5, 2022

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 helps any developer may vary from one to another.

A majority of frameworks could be split 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

Please take a look at https://web-frameworks-benchmark.netlify.app/result

GitHub

https://github.com/the-benchmarker/web-frameworks
Comments
  • 1. Remove go/iris

    https://old.reddit.com/r/golang/comments/b481q7/a_warning_about_githubcomkatarasiris/ (archive)

    iris author continues to edit issues and ban users that point out legal or technical problems with his framework. Go community in general shuns the project for all the continued wrongdoings of the author.

    The lib's README claims to be the fastest and links to https://github.com/the-benchmarker/web-frameworks as proof. But when someone pointed out the very linked benchmark says otherwise, the issue was deleted and the user banned from https://github.com/kataras/iris/.

    I suggest that iris should be removed from https://github.com/the-benchmarker/web-frameworks since giving it any exposition is just a waste of everyone's time. After so many years of community backlash the author still hasn't learned and can't even respect the very benchmark project he links on his repo.

    Reviewed by brunocassol at 2019-03-22 23:08
  • 2. Use all computing units available

    Hi,

    This PR aims to implements (or check) whole CPU usage, it closes #69

    This feature COULD be :

    • SO_REUSEPORT via spawn/fork

    • a custom implementation

    • ...

    • [x] nim

      • [x] jester
    • [x] elixir

      • [x] plug
      • [x] phoenix
    • [x] go

      • [x] fasthttprouter
      • [x] violetear
      • [x] kami
      • [x] gorilla-mux
      • [x] gin
      • [x] chi
      • [x] beego
      • [x] gf
      • [x] echo
    • [ ] kotlin

      • [ ] ktor
    • [ ] swift

      • [ ] kitura
      • [ ] perfect
      • [ ] vapor
    • [x] php

      • [x] symfony
      • [x] zend-framework
      • [x] laravel
      • [x] lumen
      • [x] zend-expressive
      • [x] slim
    • [ ] scala

      • [x] akkahttp
      • [x] http4s
    • [ x] rust

      • [ ] iron
      • [x] gotham
      • [ ] rocket
      • [ ] actix-web
      • [ ] nickel
    • [ ] objc

      • [ ] criollo
    • [x] python

      • [x] aiohttp
      • [x] tornado
      • [x] flask
      • [x] django
      • [x] vibora
      • [x] molten
      • [x] hug
      • [x] fastapi
      • [x] quart
      • [x] responder
      • [x] cyclone
      • [x] bocadillo
      • [x] sanic
      • [x] bottle
      • [x] falcon
      • [x] japronto
      • [x] starlette
    • [] crystal

      • [x] onyx
      • [x] orion
      • [ ] athena
      • [x] kemal
      • [x] router.cr
      • [x] spider-gazelle
      • [x] lucky
      • [x] amber
    • [ ] csharp

      • [ ] aspnetcore
    • [x] node

      • [x] polka
      • [x] restana
      • [x] turbo_polka
      • [x] restify
      • [x] foxify
      • [x] express
      • [x] koa
      • [x] rayo
      • [x] muneem
      • [x] fastify
      • [x] hapi
    • [x] java

      • [x] act
    • [x] cpp

      • [x] evhtp
    • [x] ruby

      • [x] hanami
      • [x] rails
      • [x] flame
      • [x] agoo
      • [x] roda
      • [x] sinatra
      • [x] rack-routing
      • [x] cuba
    • [ ] c

      • [x] agoo-c
      • [ ] kore

    Regards,

    Reviewed by waghanza at 2019-01-23 09:20
  • 3. How to rank frameworks

    Hi,

    As a standard tool, we decide to go on wrk.

    This benchmarking tool give us a lot of useful informations.

    • Global (per scenario / route to test)
      • Duration
      • Number of requests
      • Total bytes received
      • Number of error (socket / read / write / http / timeout)
      • Number of
    • Latency
      • Minimum
      • Maximum
      • Average
      • Standard deviation
    • Percentile
      • 50
      • 90
      • 99
      • 99.999

    ALL informations SHOULD be displayed, but COULD be used to determine ranks (I mean display is OK, but to keep it simple now we SHOULD only use 1 metric to rank).

    @OvermindDL1 What do you think about talking only the number of requests-per-second to rank ?

    Regards,

    Reviewed by waghanza at 2018-06-08 16:32
  • 4. Migrate as an org

    Hi @tbrand,

    Some services (which are in the marketplace) are more usable (due to github permissions) to use / enable on some group project.

    For example, using https://dependabot.com (to manage dependency) COULD only be done either on my fork or on a group project.

    Do you mind if I create a group in order to migrate this project ?

    It will be very helpful for maintainers.

    Regards,

    Reviewed by waghanza at 2018-06-15 14:26
  • 5. [DNM] Run targeted apps into containers

    Hi,

    This PR run all frameworks into docker containers.

    In order to build and run :

    shards install && shards build --release --no-debug # <- build all tools
    bin/neph # <- build and run all containers
    bin/benchmarker # <- run benchmarks
    

    @tbrand I have disabled crillo, since only on OS X.

    Regards,

    Reviewed by waghanza at 2018-04-09 18:38
  • 6. Cloudify

    Hi,

    Results are actually computed from a local docker. This decision has been taken to facilitate frameworks addition, but mess-up the results. The final goal of this tool is to present closest to (as we can) production results.

    The idea behind this PR is to run on a cloud, for this DigitalOcean

    Frameworks :

    • C
      • [ ] agoo-c
      • [ ] kore
    • C++
      • [ ] evhtp
    • C#
      • [ ] asp NET core
    • Crystal
      • [ ] amber
      • [ ] athena
      • [ ] kemal
      • [ ] lucky
      • [ ] onyx
      • [ ] orion
      • [ ] raze
      • [ ] router.cr
      • [ ] spider-gazelle
    • Elixir
      • [ ] phoenix
      • [ ] plug
    • Go
      • [ ] beego
      • [ ] chi
      • [ ] Eecho
      • [ ] fasthttprouter
      • [ ] gf
      • [ ] gin
      • [ ] gorilla-mux
      • [ ] gorouter
      • [ ] kami
      • [ ] violetear
    • Java
      • [ ] act
      • [ ] sprint-boot
    • Kotlin
      • [ ] ktor
    • Nim
      • [ ] jester
    • Node
      • [ ] express
      • [ ] fastify
      • [ ] foxify
      • [ ] hapi
      • [ ] koa
      • [ ] muneem
      • [ ] polka
      • [ ] rayo
      • [ ] restana
      • [ ] restify
      • [ ] turbo_polka
    • Objective C
      • [ ] Criollo
    • PHP
      • [ ] laravel
      • [ ] lumen
      • [ ] slim
      • [ ] symfony
      • [ ] zend-expressive
      • [ ] zend-framework
    • Python
      • [ ] aiohttp
      • [ ] bocadillo
      • [ ] bottle
      • [ ] cyclone
      • [ ] django
      • [ ] falcon
      • [ ] fastapi
      • [ ] flask
      • [ ] hug
      • [ ] japronto
      • [ ] masonite
      • [ ] molten
      • [ ] quart
      • [ ] responder
      • [ ] sanic
      • [ ] starlette
      • [ ] tornado
      • [ ] vibora
    • Ruby
      • [ ] agoo
      • [ ] cuba
      • [ ] flame
      • [ ] hanami
      • [ ] rack-routing
      • [ ] rails
      • [ ] roda
      • [ ] sinatra
    • Rust
      • [ ] actix-web
      • [ ] gotham
      • [ ] iron
      • [ ] nickel
      • [ ] rocket
    • Scala
      • [ ] akkahttp
      • [ ] http4s
    • Swift
      • [ ] kitura
      • [ ] kitura-nio
      • [ ] perfect
      • [ ] vapor

    Display comprehensive results

    ... has to be defined ...

    Regards,

    Reviewed by waghanza at 2018-11-15 15:09
  • 7. Benchmarking test - statistical results

    So my new server is setup, nice and empty and ready to run tests on (for now), so I'm playing with it. :-)

    8-core (16-hyperthreads), 3.7ghz, 16gigs ram (for now), etc... etc...

    First, the current result sets that are currently built into this git project are not indicative of the actual through-put that a server can sustain as it always tests a simple iteration of command and how fast they complete rather then how long each request takes, the average, the longest a request took, etc... etc...

    So I whipped up a quick script to test the statistical parts in far far greater detail than this current git HEAD does, these are the results for a set of servers. I used rust, crystal, go, python, elixir, and node for the servers, mostly because I haven't installed (or figured out how, depending) the rest of the stuff, plus these run the fastest overall. I did have an issue with server_python_japronto, it refused to run... The server_python_flask did not install flask, I had to do that manually, that should be fixed... japronto does not seem to be in pip, so it remained missing. I'll post the results here as I get them (it outputs markdown format so the posts will be a run with a bit of description at the top of each).

    Reviewed by OvermindDL1 at 2018-01-23 20:59
  • 8. uWebSocket supicious ?

    Hi @Fenny,

    You inform me that the is some stories about uWebSocket @see https://medium.com/@rockstudillo/beware-of-uwebsockets-js-b51c92cac83f

    Thanks for notification :stuck_out_tongue:

    /cc @alexhultman @dalisoft @aadityataparia @jkyberneees


    The idea here is to determine if uWebSocket based frameworks could be listed here


    Personally, I have no idea of how npm registry works

    Reviewed by waghanza at 2020-01-13 07:57
  • 9. Skeptical about controversial results

    Hi, I had some time to check the benchmark of Laravel and Flask on my computer i7-7600U, 2.8x4 GHz and here is the result: https://gist.github.com/doanguyen/a81cccb4e884c63422e2c5ae3e846d18

    It shows the total different outcomes, Laravel serves only 87 req/s and Flask at best is 8506 req/s, I did some research and it looks similar to some other benchmarks, for instance, https://medium.com/@mihaigeorge.c/web-rest-api-benchmark-on-a-real-life-application-ebb743a5d7a3

    Do you have any clue what's happening?

    Reviewed by doanguyen at 2018-10-09 17:22
  • 10. Add Elixir frameworks

    Added frameworks:

    • Phoenix
    • Plug (using :plug_cowboy)
    • cowboy (using the standard :cowboy API)
    • cowboy_stream (using :cowboy low-level Stream API)

    I am not 100 % familiar with this project so I tried to replicate settings from other languages/frameworks but I am not sure I did it correctly.

    Closes #2197 Closes #1353 Closes #89

    Reviewed by Sgiath at 2020-02-04 14:53
  • 11. Choosing a code of conduct

    Hello,

    As our community is growing fast (at least I hope, so :stuck_out_tongue_winking_eye:), it will be useful to choose a code of conduct, at least to be warm to new comers

    @tbrand @aichholzer @OvermindDL1 any thoughts ?

    Regards,

    Reviewed by waghanza at 2018-09-04 21:47
  • 12. Update ponylang/ponyc Docker tag to v0.51.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | ponylang/ponyc | stage | minor | 0.40.0 -> 0.51.1 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    Reviewed by renovate[bot] at 2022-08-10 15:52
  • 13. Update dependency laravel/framework to ~9.24.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | laravel/framework (source) | require | minor | ~9.23.0 -> ~9.24.0 |


    Release Notes

    laravel/framework

    v9.24.0

    Compare Source

    Added
    • New db:show, db:table and db:monitor commands (#​43367)
    • Added validation doesnt_end_with rule (#​43518)
    • Added Illuminate/Database/Eloquent/SoftDeletes::restoreQuietly() (#​43550)
    • Added mergeUnless to resource ConditionallyLoadsAttributes trait (#​43567)
    • Added Illuminate/Support/Testing/Fakes/NotificationFake::sentNotifications() (#​43558)
    • Added implode to Passthru in Illuminate/Database/Eloquent/Builder.php (#​43574)
    • Make Config repository macroable (#​43598)
    • Add whenNull to ConditionallyLoadsAtrribute trait (#​43600)
    • Extract child route model relationship name into a method (#​43597)
    Revert
    Fixed
    • Fix unique locking on broadcast events (#​43516)
    • Fixes the issue of running docs command on windows (#​43566, #​43585)
    • Fixes output when running db:seed or using --seed in migrate commands (#​43593)
    Changed
    • Gracefully fail when unable to locate expected binary on the system for artisan docs command (#​43521)
    • Improve output for some Artisan commands (#​43547)
    • Alternative database name in Postgres DSN, allow pgbouncer aliased databases to continue working on 9.x (#​43542)
    • Allow @​class() for component tags (#​43140)
    • Attribute Cast Performance Improvements (#​43554)
    • Queue worker daemon should also listen for SIGQUIT (#​43607)
    • Keep original keys when using Collection->sortBy() with an array of sort operations (#​43609)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    Reviewed by renovate[bot] at 2022-08-09 14:43
  • 14. Update vertx.version to v4.3.3

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | io.vertx:vertx-web (source) | 4.3.2 -> 4.3.3 | age | adoption | passing | confidence | | io.vertx:vertx-stack-depchain (source) | 4.3.2 -> 4.3.3 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    Reviewed by renovate[bot] at 2022-08-09 14:43
  • 15. Update module github.com/uptrace/bunrouter to v1.0.18

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/uptrace/bunrouter | require | patch | v1.0.17 -> v1.0.18 |


    Release Notes

    uptrace/bunrouter

    v1.0.18

    Compare Source

    Please refer to CHANGELOG.md for details


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    Reviewed by renovate[bot] at 2022-08-09 11:31
  • 16. Update hexagonVersion to v2.0.19

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.hexagonkt:http_server_netty_epoll (source) | 2.0.17 -> 2.0.19 | age | adoption | passing | confidence | | com.hexagonkt:http_server_netty (source) | 2.0.17 -> 2.0.19 | age | adoption | passing | confidence | | com.hexagonkt:http_server_jetty (source) | 2.0.17 -> 2.0.19 | age | adoption | passing | confidence |


    Release Notes

    hexagonkt/hexagon

    v2.0.19

    Compare Source

    v2.0.18

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    Reviewed by renovate[bot] at 2022-08-09 11:31
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

The first fully customizable Laravel JSON:API builder. "CRUD" and protect your resources with 0 (zero) extra line of code. Installation You can instal

Aug 12, 2022
KodExplorer is a file manager for web. It is also a web code editor, which allows you to develop websites directly within the web browser.
KodExplorer is a file manager for web. It is also a web code editor, which allows you to develop websites directly within the web browser.

KodExplorer is a file manager for web. It is also a web code editor, which allows you to develop websites directly within the web browser.

Feb 10, 2022
Shortest Path - have a function ShortestPath (strArr) take strArr which will be an array of strings which models a non-looping Graph.

Have the function ShortestPath(strArr) take strArr which will be an array of strings which models a non-looping Graph

Feb 5, 2022
Skosmos is a web-based tool providing services for accessing controlled vocabularies, which are used by indexers describing documents and searchers looking for suitable keywords.

Skosmos is a web-based tool providing services for accessing controlled vocabularies, which are used by indexers describing documents and searchers looking for suitable keywords.

Jul 22, 2022
The light version of NexoPOS 4.x, which is a web-Based Point Of Sale (POS) System build with Laravel, TailwindCSS, and Vue.Js.
The light version of NexoPOS 4.x, which is a web-Based Point Of Sale (POS) System build with Laravel, TailwindCSS, and Vue.Js.

About NexoPOS 4.x NexoPOS 4 is a free point of sale system build using Laravel, TailwindCSS, Vue and other open-source resources. This POS System focu

Aug 10, 2022
Doogle is a search engine and web crawler which can search indexed websites and images
Doogle is a search engine and web crawler which can search indexed websites and images

Doogle Doogle is a search engine and web crawler which can search indexed websites and images, and then use keywords to be searched later. Written pri

Aug 10, 2022
Web Site developed for the subject of Web Development 2

Trabalho - DW2 Web Site developed for the discipline of Web Development 2. It has been developed to simulate a FIFA World Cup's system where you can C

Feb 15, 2022
This project processes a small database with php all on a web server. This project uses XAMPP to run the web server and the database.

PHP-introduction This project processes a small database with php all on a web server. This project uses XAMPP to run the web server and the database.

Jan 6, 2022
Surftimer-Web-Stats is Web with surftimer statistics.

Surftimer-Web-Stats v2 Surftimer-Web-Stats is Official Web with statistics for Surftimer-Official. Features: Dashboard with TOP players and recent Rec

Aug 13, 2022
Sslurp is a simple library which aims to make properly dealing with SSL in PHP suck less.

Sslurp v1.0 by Evan Coury Introduction Dealing with SSL properly in PHP is a pain in the ass and completely insecure by default. Sslurp aims to make i

Jul 11, 2022
Formcreator is a plugin which allow creation of custom forms of easy access
Formcreator is a plugin which allow creation of custom forms of easy access

Formcreator is a plugin which allow creation of custom forms of easy access. At the same time, the plugin allow the creation of one or more tickets when the form is filled.

Aug 3, 2022
A bot written in PHP which attempts to link IRC with SQL database, allowing for integration between platforms

Valeyard IRC-SQL-GateWay A bot written in PHP which attempts to link IRC with SQL database, allowing for integration between platforms. This bot is mo

Jan 31, 2022
AnsibleBoy aims to use the Asnible `facts` as data, which can then be visualized in a table format
AnsibleBoy aims to use the Asnible `facts` as data, which can then be visualized in a table format

AnsibleBoy - Ansible Frontend Hub About AnsibleBoy aims to use the Ansible facts as data, which can then be visualized as a table ToDo (note that this

Jul 14, 2022
Tutorial app which is built in the tutorial

Nextcloud App Tutorial This is the tutorial app which shows how to develop a very simple notes app. Try it To install it change into your Nextcloud's

Jul 15, 2022
CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file

CrateKeyShopGUI CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file Depend FormAPI EconomyAPI PiggyCrate InvCrashFix Download Dow

Jan 7, 2022
A Symfony Feature Flag Bundle which easily allows you to configure and use your favorite feature flag provider.

Metro Markets FF Metro Markets FF is a Feature Flag Symfony Bundle. It easily allows you to configure and use your favorite feature flag provider. Ins

May 23, 2022
The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.

netz98 magerun CLI tools for Magento 2 The n98 magerun cli tools provides some handy tools to work with Magento from command line. Build Status Latest

Aug 9, 2022
A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.
A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet.

GitLabBundle A Kimai 2 plugin, which send duration of cards to GitLab spend issues of timesheet. Installation First clone it to your Kimai installatio

May 6, 2022
Fly50W is a new language which helps you build simple apps using more than 500k lines of code easily.

Fly50W is a new language which helps you build simple apps using more than 500k lines of code easily. Installation

Jun 22, 2022