Git Product home page Git Product logo

benchmarker's Introduction

Benchmarking several backend applications

  • Why?
    • I’m mainly concerned with what I have in my development toolbelt - that means Python, JS, Clojure & Rust.
    • It is widely known that Rust is the most performant language, but still I want to see how fast it is compared to other frameworks/libraries I’ve been using daily for enterprise-grade application development.
    • Learning fun - Thats why!

Subjects for testing

NOTE

  • source code for HTTPKit app is here
  • no source code available for Light4j

Scenario

  • Tool: bombardier
  • Concurrent connection: 100
  • Duration: 30s
  • Env: production for all test app
  • Testing on a simple API that return sum of 2 numbers, in the following format

GET <host:port>/<lang>/plus?x=1&y=3

# response
{
   "total": 4
}

Results

  • HTTPKit
$ bombardier -c 100 -d 30s "http://localhost:8080/clojure/plus?x=1&y=3"
Bombarding http://localhost:8080/clojure/plus?x=1&y=3 for 30s using 100 connection(s)
[====================================================================================] 30s
Statistics        Avg      Stdev        Max
  Reqs/sec     30265.79   11146.13   48148.98
  Latency        3.32ms     3.46ms   319.56ms
  Throughput:     6.72MB/s
  • FastAPI
$ bombardier -c 100 -d 30s "http://localhost:5000/python/plus?x=3&y=1"
Bombarding http://localhost:5000/python/plus?x=3&y=1 for 30s using 100 connection(s)
[===================================================================================] 30s
Statistics        Avg      Stdev        Max
  Reqs/sec     10740.29    1730.15   13932.79
  Latency        9.32ms     8.50ms   379.46ms
  Throughput:     2.22MB/s

NOTE: to be frank, I expected more from FastAPI :(

  • Actix-Web
$ bombardier -c 100 -d 30s "http://localhost:8080/rust/plus?x=1&y=3"
Bombarding http://localhost:8080/rust/plus?x=1&y=3 for 30s using 100 connection(s)
[===================================================================================] 30s
Statistics        Avg      Stdev        Max
  Reqs/sec     81700.23   13506.45   93240.30
  Latency        1.22ms     3.18ms   293.96ms
  Throughput:    15.40MB/s
  • Light-4J
$ bombardier -c 100 -d 30s "http://localhost:8080/light4j/plus?x=3&y=2"
Bombarding http://localhost:8080/light4j/plus?x=3&y=2 for 30s using 100 connection(s)
[===================================================================================] 30s
Statistics        Avg      Stdev        Max
  Reqs/sec     83641.34   11065.35  101699.66
  Latency        1.21ms     5.73ms   308.53ms
  Throughput:    16.11MB/s

Summary

  • ActixWeb ~ Light-4J
  • ActixWeb ~ 2.5x faster than HTTPKit
  • HTTPKit ~ 3x faster than FastAPI

    May add some more server-app later…

benchmarker's People

Contributors

vutran1710 avatar dependabot[bot] 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.