DEV Community

Discussion on: Processing CPU-intensive Jobs in NodeJS

Collapse
 
valathsu profile image
Sujeesh S Valath

Split your app into producer and consumer service. Consider a que between producer and consumer service like Kafka. It will really help to scale and failure of one service won't affect other.

Collapse
 
klvenky profile image
Venkatesh KL

Definitely, we can use it with an approach where the input file is attached & data pushed to a PubSub or a messaging queue then we can push the job to a different system altogether.
But that really depends on the specific use case though.

Collapse
 
sw360cab profile image
Sergio Matone

I do achieved the same result using Pub/Sub. Specifically backed by Redis and Bull Queue -> check this out github.com/OptimalBits/bull