You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
You see that as a new subscriber is added, it is actually added to a list rather than to redis.
You could count the number of subscribers in the list, however if you run multiple instances (load balancing and using multiple cores etc.) then the number would be inaccurate as you would only count the number of subscribers for that particular instance.
I did a basic online counter by doing a redis increment on a key every time someone connected, and decrement when they disconnected.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
See:
http://redis.io/commands/pubsub
In my use case I would use it to count the number of active connections to a channel
The text was updated successfully, but these errors were encountered: