Open aeifn opened 2 years ago
I had more detailed look. I think we could store whole user objects hash in Redis (usLogin
, usId
defined in session controller) so changes in user object are shared among instances. This will make login status shared, but more important user stats and limits will be shared among instances too. With regard to sessions, since sessions are "sticky" at the moment, they could stay at node instances as they are now.
Now we keep user state in RAM; it may be useful for distributed model to save user state in caching database.
As a first step, we can try to sync user's online/offline status.