Giter Site home page Giter Site logo

madhusudhand / node-performance Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 17 KB

Performance metrics of different NodeJS frameworks

License: MIT License

JavaScript 100.00%
nodejs performance-metrics performance-analysis performance performance-test node-js express express-js hapi hapijs

node-performance's Introduction

node-performance

In this repo, I've run a round of tests for different node frameworks.

Results

Rank Framework Version Req. served Per Sec.
#1 donode 1.0.0-beta.3 1200 - 1300
#2 express 4.14.1 900 - 1200
#3 restify 4.3.0 900 - 1150
#4 hapi 16.1.0 350 - 500

Out of the listed frameworks results are quite near for all except for hapi.

hapi seems to be damn slower and clearly out of race.

GET:

express and restify are serving around 1200 requests per second.

Whereas donode is slightly higher and is 1250+ requests per second.

POST:

restify and express POST requests are not as performant as their GET requests. They are slightly slower and are about 1000 requests per sercond.

Whereas donode performing almost equal to its GET requests at a rate about 1200 requests per second.

donode wins !!

This framework is performing better than all in all categories and also code looks pretty much organized. But its a new framework and currently in beta version.

Detailed results

I've broken the results down and by request type have included requests served per sec and mean latency.

Note:- Two tests performed per request type here are the observed results.

Framework Request type Req. served Per Sec. Mean Latency
donode GET 1262 15.8 ms
1203 16.5 ms
POST 1214 16.4 ms
1218 16.3 ms
express GET 1135 17.5 ms
989 20.1 ms
POST 1038 19.2 ms
907 21.9 ms
restify GET 1220 16.3 ms
1158 17.2 ms
POST 957 20.8 ms
935 21.2 ms
hapi GET 496 40.2 ms
418 47.7 ms
POST 349 57.1 ms
389 51.3 ms

Test conditions

Condition Values/Comments
Number of requests sent 10,000
Concurrency 20 requests
Routes 10 different routes with route params
Computer Config
- OS Mac 10.12.3
- RAM 16 GB
- Processor 2.5 GHz Intel Core i5
Node version 6.9

Running Tests

  1. clone this repo
  2. npm install (run another "npm install" inside donode directory)
  3. npm install -g loadtest
  4. npm run framework-name

and loadtest using the following.

GET

loadtest -n 10000 -c 20 http://localhost:3000/loadtest/get/10/data10/20

POST

loadtest -n 10000 -c 20 -m POST -T application/json -P '{"key": "value"}' http://localhost:3000/loadtest/post/1/data10/2

TODO: Test execution needs to be simplified.

node-performance's People

Contributors

madhusudhand avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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