Skip to content

dolezel/bb-node-performance

Repository files navigation

bb-node-performance

BrownBag about node.js performance

Single threaded ?!

See event loop brownbag

libuv architecture

Node internals

Example:

It looks like C++ Addons 😲

Little offtopic - new promise API

Time for code

Threads

npm run start:measure simple
npm run start:measure single
npm run start:measure queue
npm run start:measure pool
npm run start:measure pool+1
npm run start:measure 2*pool
npm run start:measure cpus
npm run start:measure cpus-2
npm run start:measure quiz

Clusters

npm run start:cluster simple
npm run start:cluster single
npm run start:cluster cluster
npm run start:cluster cpus
npm run start:cluster 2*cpus
# sudo apt install apache2-utils
ab -c 10 -n 10 http://localhost:3000/

Workers

npm i webworker-threads
npm run start:workers eval
npm run start:workers worker
npm run start:workers native # requires --experimental-worker flag

About

BrownBag about node.js performance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published