Node.js, pm2, and sticky sessions – possible?
Asked Answered
E

1

7

Is there a way to have sticky sessions with node module pm2? I'm aware that they were intentionally left out of node's internal cluster module, and so it might not be the best architecture choice with Node.js to begin with. However, in case of paused media streams, for example, it would be useful.

Eindhoven answered 3/2, 2014 at 2:56 Comment(0)
A
4

Like you I've been using pm2 and like it, but need something that supports sticky sessions.

This module does automatic clusterisation with Node's cluster module and maintains sticky sessions. At this point I'm not sure how to optimally use it with pm2, as I've only just now implemented it for the first time with my app. In my initial integration of it with pm2, I'm going to be limiting pm2 to one process, because the sticky-session module seems to do the clusterisation over available cpu's itself.

I'll return to add info here as I learn more about best use.

Atrip answered 13/4, 2014 at 1:16 Comment(2)
Returning any time soon ?Jointress
@UzumakiNaruto what do you think?Katowice

© 2022 - 2024 — McMap. All rights reserved.