Socket service pm2-I max deployment multi-process deployment, communication between processes

Boss:

my program is an instant messaging service of socket.io, and my program does not use cluster module to use cpu, so I think pm2 deployment uses pm2"s multi-input

program, but when I use it, I find that the method of pm2 is equivalent to starting several programs in cpu, so when the user speaks, only the user in the current kernel program can receive

.

to push, should I introduce redis to manage socket connections?

Dec.12,2021

this concurrent extension requires the program itself to be stateless. Your current situation is that if you want to start socket services in different processes, you need to share information between processes. In your current situation, adding a message server is a relatively simple way to solve the problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bc9bfd-3099c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bc9bfd-3099c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?