Git Product home page Git Product logo

http-server-benchmarks's Introduction

http-server-benchmarks

This is a very basic benchmark suite to compare different HTTP server's performance. It is inspired by arcadius/java-rest-api-web-container-benchmark, but uses h2load instead of ab.

It works by running a predifined number of requests from a predefined number of concurrent clients against an HTTP server at localhost and measuring, among others, the execution time.

Currently, I included server implementations in Java (using Jersey with an embedded Grizzly server), Go (using net/http) and NodeJS (once using plain http package and again using the de-facto standard Express framework). All implementations are very basic REST APIs consisting of exactly one route, which exposes a static set of simple resources (Todo Items) as JSON. My results can be found in the results folder.

How to run

Requirements

Running

  1. Clone this repository
  2. Start an HTTP server on your local machine
  3. Adapt parameters in run-load.sh
    1. URL: The URL of your HTTP server's endpoint to be tested against
    2. NUM_REQUESTS: Total number of request to execute across all clients
    3. CONCURRENCY: Number of concurrent clients to perform requests
    4. THREADS: Number of CPU threads to use for h2load
  4. chmod +x run-load.sh
  5. ./run-load.sh
  6. View results.log

Java vs. Go vs. Node

Running this benchmark suite gave me the following results. To read more details about my test setup etc., please refer to this article.

License

MIT @ Ferdinand Mütsch

http-server-benchmarks's People

Contributors

muety avatar

Watchers

James Cloos avatar Tim DeBarbora 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.