f5devcentral / f5-declaration-validator

validate f5 declarative declarations (as3/do/ts/cf)
Apache License 2.0
4 stars 2 forks source link

[RFE] scale node process #6

Open DumpySquare opened 2 years ago

DumpySquare commented 2 years ago

Nodejs has a built in clustering mechanism that manages multiple child processes spawn by a master process. This allows the app to scale across multiple processes on multiple threads/cores. the clustering process has a load balancer, but doesn't manage state. this works well for this simple api since no state is needed, just req -> resp.

this should be the first scaling initiative before scaling with docker/k8s.

https://nodejs.org/docs/latest-v16.x/api/cluster.html#cluster

https://blog.appsignal.com/2021/02/03/improving-node-application-performance-with-clustering.html https://www.w3schools.com/nodejs/ref_cluster.asp https://blog.logrocket.com/optimize-node-js-performance-with-clustering/ https://medium.com/tech-tajawal/clustering-in-nodejs-utilizing-multiple-processor-cores-75d78aeb0f4f https://www.freecodecamp.org/news/scaling-node-js-applications-8492bd8afadc/amp/