sdogruyol / which_is_the_fastest

Which is the fastest web framework?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Which is the fastest?

Result

How to run server

bin/server_rails # for rails
bin/server_kemal # for Kemal
bin/server_route_cr # for route.cr

How to run client

time bin/client -t 16 -r 1000 # 48000 requests in total
time bin/client -t 16 -r 2000 # 96000 requests in total
time bin/client -t 16 -r 3000 # 144000 requests in total
time bin/client -t 16 -r 4000 # 192000 requests in total
time bin/client -t 16 -r 5000 # 240000 requests in total

Regulation and Rule

  • Each server has no logics
  • There are only 3 routes
    • GET '/' return status code 200 with empty body
    • GET '/user/:id' return status code 200 with the id
    • POST '/user' return status code 200 with empty body

Installation

You need

  • crystal
  • rails

To compile servers,

> make

Usage

To run server

./bin/server_rails
./bin/server_kemal
./bin/server_route_cr

To run client

time ./bin/client

You can set # of threads and # of request loops(each loop requests 3 times) by

time ./bin/client -t 16 -r 1000

In the above example, 16 threads requests 1000 * 3 times. So 48000 requests are sent in total.

Thanks for

Development

  • Give me PR when you want to add other web frameworks
  • Give me PR when you can tuning each framework (under the regulation)

Contributing

  1. Fork it ( https://github.com/tbrand/which_is_the_fastest/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • tbrand Taichiro Suzuki - creator, maintainer

About

Which is the fastest web framework?

License:MIT License


Languages

Language:Ruby 71.3%Language:HTML 14.6%Language:Crystal 6.6%Language:JavaScript 3.4%Language:CSS 2.6%Language:Makefile 0.9%Language:CoffeeScript 0.6%