NodeJS is bad when it has to handle CPU intensive tasks. I decided to offload the problematic processes into a dedicated worker process. It turns out that doing it reduced significantly the overhead of scaling out the application. I will share the details to have a bulletproof multi-core single codebase architecture in production.

7m read timeFrom itnext.io
Post cover image
Table of contents
The Scaling-Out Architectural Decision 🕵🏻The Folder Structure 🥪The Tech Stack 🕹️The Dispatcher 💎Offload The Problem 👾The Worker Process⚙️The Final Picture 🌆The Development Workflow 🛸Hey, before leaving this article 🙏Conclusions

Sort: