Giter VIP home page Giter VIP logo

wfpc's Introduction

Which Web Framework is Faster?

Basic out of the box Web frameworks performance comparison

There are numerous of backend web frameworks for different programming languages. Each of them comes with its own advantages and drawbacks. And it is not a simple task to answer the question "Which framework is the best?". But we can looks at the topic from different perspectives. And performance is a simple metric (yet just one of many) that is measurable and gives an answer to "which framework is faster/fastest?"

The purpose of this project is to attempt to measure a performance of different web stacks as they come out of the box, with no code added.

Express.js Sinatra Flask Rails Django Laravel

Results

Test was performed with ApacheBench tool performing 10k requests with concurrency level 10.

ab -n 10000 -c 10 http://127.0.0.1:port
Framework Web Server Time taken Requests per second Time per request Longest request
Express Node.js/http 5.7s 1744.5 5.7 ms 184 ms
Flask waitress 9.0s 1109.6 9.0 ms 130 ms
Sinatra Puma 5.4 16.4s 608.8 16.4 ms 239 ms
Django WSGIServer 21.9s 455.7 21.9 ms 62 ms
Rails Puma 5.4 138.4s 72.2 138.4 ms 1171 ms
Laravel nginx 378.5s 26.4 378.5 ms 1042 ms

Note: Ofcourse there are a lot of variables that influence application performance. A lot depends on a web server that you put in front of your application, so numbers above may vary in different configurations. The test was performed with webservers that are typical for the stack just to have a picture of how performance of those frameworks compare to each other.

You can test it yourself

In order to perform tests yourself you'll need to run this project with Docker, so make sure that docker app is installed on your machine.

git clone https://github.com/alchaplinsky/wfpc.git
cd wfpc
docker compose up

Perform tests>

ab -n 10000 -c 10 http://127.0.0.1:port

License

MIT © Alex Chaplinsky

wfpc's People

Contributors

alchaplinsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.