RabbitMQ and PM2 in Node.js for managing Multiple Processes
summary
Migrates cluster module to PM2 and RabbitMQ, replacing custom IPC with a brokered topic exchange with AMQP; HTTP forks, plus dedicated SMS/email/image worker processes, move from in-process master routing to persistent queues. PM2 provides auto-restart, clustering and metrics; RabbitMQ gives durable delivery but adds operational complexity. A loop bug spawns more processes than CPU cores; full migration and tuning take about a year in practice. Config shrinks from large cluster script to small PM2 + publish/subscribe code.
AI-written summary · about
chapters (5)
related talks
32mProduction Applications with PM2
41mDecouple all the things: Asynchronous messaging keeps it simple
24mAdvanced RabbitMQ Strategies: A case study
32mRabbitMQ in Real Life - Tips and Tricks
40mScaling RabbitMQ
30mA love letter to messaging: Celebrating RabbitMQ's journey
22mLessons Learned from Scaling RabbitMQ in a High-Growth (...)
47mRabbitMQ Hands On
