is it fine to store the server state in the forked process? (PM2 cluster)

so my server keeps a user session in memory... and I want to introduce clustering using PM2. I obviously want to keep the state global, so I've found this pattern called sidecar pattern, where you use the loopback to share info between processes and I thought who needs Reddis cache while I'm in the same host. so do I just use this pattern and make those instances of the server's process store the state in forked one? or do I use pipes? I've never heard about anyone use pipes for this, and I'm not sure why. although I think it's the most efficient way after in-process communication.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server