Currently, I have a NestJS application that I typically deploy using PM2 in cluster mode with multiple instances running.
One thing to note is that NestJS utilizes the Singleton pattern for its services. This is crucial for some of my features, as it allows me to access service properties globally and maintain their values.
My concern is whether or not using PM2 cluster mode will cause any issues. Can NestJS share this Singleton pattern across instances?
Note: I am hesitant to introduce additional complexity to the project, such as installing Redis to manage global data storage.