pastvu icon indicating copy to clipboard operation
pastvu copied to clipboard

Store user object hash at Redis

Open aeifn opened this issue 4 years ago • 1 comments

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.

aeifn avatar Dec 07 '21 04:12 aeifn

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.

kabalin avatar Jan 27 '22 20:01 kabalin