I am researching use cases to introduce cluster computing with nodejs to a few friends.
My goal is to explain a few real life nodejs cluster cases, and why nodejs is helpful at creating those particular cases.
So far, really one case appeals to me:
- clustering a webserver (like an API server by REST) (reason: load balancing)
I saw examples about doing expensive calculations, mentioning the advantages on doing so on a different thread/processor.
That lead me to thinking about about having worker pools, each pool doing different parts like handling solely the connection to a database, generating PDFs and similar.
Trying to understand the ties from the worker to the master, I fiddled around and I am still not sure:
- are nodejs clusters are only suited for having the same process be able to run in parallel (documentation suggests it)
- or does it makes sense to have nodejs cluster workers like separate tasks in pools.
.. resulting in: what use cases are actually real world use cases with nodejs?
Hopefully it is understandable. Opinions are very welcomed.