How is possible to count all application on-line "Sessions"?
Not all connected PC (from ID address), but all sessions.
E.g.: If in same PC open Chrome and Firefox with my app, the counter must be 2.
How is possible to count all application on-line "Sessions"?
Not all connected PC (from ID address), but all sessions.
E.g.: If in same PC open Chrome and Firefox with my app, the counter must be 2.
If you have only one instance of the application, it is easier. You can create a middleware and store session ids in a Set. Then to get the count, you can just use the element count in the Set. If you have multiple instances of the application, you need to create a common db like Redis, and use their Set features. Don't forget to remove the session ids when the session ends, or perhaps make them expire after a while unless renewed.