Code Monkey home page Code Monkey logo

cluster-api-fork's Introduction

Cluster API

  • A Simple API running with Cluster in Node.js

Run

  • Run dev:
npm run dev
  • Run cluster:
npm run cluster
  • Run tests (this tests should be run with cluster up):
npm test
  • Run load test (this test should be run with cluster or server up):
npm run test:load

Report load test in simple server

Running 2s warmup @ http://localhost:3000/success 1 connections 10 workers

Running 30s test @ http://localhost:3000/success 500 connections 10 workers

...

Stat 2.5% 50% 97.5% 99% Avg Stdev Max
Latency 29 ms 34 ms 54 ms 70 ms 35.5 ms 8.6 ms 269 ms
Stat 1% 2.5% 50% 97.5% Avg Stdev Min
Req/Sec 9599 9599 14231 14951 13916.27 1077.03 9594
Bytes/Sec 1.98 MB 1.98 MB 2.93 MB 3.08 MB 2.87 MB 222 kB 1.98 MB
Code Count
200 417490

Req/Bytes counts sampled once per second.

  • of samples: 300
Percentile Latency (ms)
0.001 4
0.01 8
0.1 13
1 28
2.5 29
10 31
25 32
50 34
75 36
90 40
97.5 54
99 70
99.9 138
99.99 217
99.999 266

418k requests in 30.21s, 86 MB read


Report load test in cluster

Running 2s warmup @ http://localhost:3000/success 1 connections 10 workers

Running 30s test @ http://localhost:3000/success 500 connections 10 workers

...

Stat 2.5% 50% 97.5% 99% Avg Stdev Max
Latency 3 ms 23 ms 72 ms 89 ms 26.1 ms 19.48 ms 424 ms
Stat 1% 2.5% 50% 97.5% Avg Stdev Min
Req/Sec 8935 8935 19903 21935 18859.2 3200.16 8930
Bytes/Sec 1.84 MB 1.84 MB 4.1 MB 4.52 MB 3.89 MB 659 kB 1.84 MB
Code Count
200 565766

Req/Bytes counts sampled once per second.

  • of samples: 300
Percentile Latency (ms)
0.001 0
0.01 0
0.1 0
1 2
2.5 3
10 6
25 12
50 23
75 35
90 49
97.5 72
99 89
99.9 151
99.99 309
99.999 418

566k requests in 30.19s, 117 MB read


Pending

  • route return 200 (/success)
  • route with error no treated (/throw-error)
  • route with error treated (/throw-error-treated)
  • route with error promise no treated (/throw-error-promise)
  • route with error promise treated (/throw-error-promise-treated)
  • add tests
  • organize routes
  • route throw kill process (/throw-error-kill)
  • create cluster
  • graceful shutdown
  • capture errors no treated
  • implement load test
  • implement cluster with server express

cluster-api-fork's People

Contributors

viniciusfreitasrj17 avatar

Watchers

 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.