#Running NestJS in worker Mode

3 messages · Page 1 of 1 (latest)

wind dove
#

Hi

We have a NestJS app which uses PgBoss to handle queues. it works just great

There can be scenarios on increased workloads to add more workers to process jobs

We can simply increase number of replicas of current application

But in worker mode, we really don’t need some modules, so i was wondering what is the correct way to implement this strategy without changing our Nest monolith

real musk
#

I prefer to have a separate standalone application for handling workers. Instead of AppModule they have own WorkerModule which only has a subset of dependencies/modules.

wind dove
#

Make sense, will try it