Git Product home page Git Product logo

webframework-bench's Introduction

web framework benchamark

Benchmark to get the performance of http frameworks.

They are also very simple examples to learn.

benchmarks

frameworks

actix-web: github

axum: github

warp: github

poem: github

net/http(go): github

binary size

we can run "strip" to get smaller binary size for rust apps.

framework size(release) strip
actix-web 4.6 MB 3.3 MB
auxm 4 MB 3 MB
warp 2.8 MB 2.1 MB
poem 2.9 MB 2.2 MB
net/http 6.6 MB N/A
  • Result

Smaller is better.

# macosx (file size)
net/http(go) > actix(rust) > axum(rust) > warp(rust)

memory

framework real memory size private memory size
actix-web 8.1 MB 6.5 MB
auxm 5.8 MB 4.2 MB
warp 5.1 MB 3.8 MB
poem 5.1 MB 3.8 MB
net/http 15.6 MB 10.3 MB
  • Result

Smaller is better.

# macosx (memory size)
net/http(go) > actix(rust) > axum(rust) >=< warp(rust)

performance

  • Benchmark tool (wrk)
brew install wrk
apt get wrk 

# no wrk package in ubuntu 20.14, have to build myself or use rewrk instead
wrk --latency -t4 -c128 -d10s http://127.0.0.1:8081/user
wrk --latency -t4 -c128 -d10s http://127.0.0.1:8082/user
wrk --latency -t4 -c128 -d10s http://127.0.0.1:8083/user
wrk --latency -t4 -c128 -d10s http://127.0.0.1:8084/user
wrk --latency -t4 -c128 -d10s http://127.0.0.1:8091/user
framework Transfer/sec Requests/sec
actix-web 14.70 MB 93962.68
auxm 15.94 MB 101911.63
warp 17.05 MB 109000.33
net/http 13.28 MB 84373.58
  • Result

Larger requests/sec is better.

# macosx (requests/sec)
warp(rust) >=< axum(rust) > actix(rust) > net/http(go)

Todo

  • Add hyper(rust), deno, express(node.js) into benchmark

  • Add build time

refs

webframework-bench's People

Contributors

piaoger 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.