Answer the question
In order to leave comments, you need to log in
How to work with express+cluster?
The Internet is full of simple examples of how to use express + cluster together. But more complex things become more difficult to do. For example, there is an action that I would like to do only 1 time. For example, accessing an external api on a timer to get exchange rates. Do it on the true branch of cluster.isMaster? It doesn't seem right to me
Answer the question
In order to leave comments, you need to log in
move similar logic to a microservice - 1 background process, not in a cluster for periodic actions, such as a request to an external api
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question