How to figure out total count and details currently logged in users in multi-sever scenario
I am using Express +mongoose +Mongo angular for my web application
I want to know how can i figured out list of all logged in users(specially when we have more then one sever), I need to know when user is idle, active, last active etc
Bu knowing list of logged in user, one user can share stuff with other user.
or maybe I can user Redis(i am very new to this)
To get list of logged in user, we can push user info in mongo, as soon as user login, Later use redis for quicker access to user list. if you are using JWT token for authentication , please use Jwt-redis-session
for session this below article will be helpful. https://codeforgeek.com/2015/07/using-redis-to-handle-session-in-node-js/
To update other users in realtime , there below module will be helful. socket.io-adapter socket.io-redis