think have 100,000 user , each user subscribe own channel , each client have 1 channel .
from redis documention , saw publish functon :
time complexity: o(n+m) n number of clients subscribed receiving channel , m total number of subscribed patterns (by client).
now user publish message 1 user ...
what n , m in example ?
- n = 1 because each client listens own channel
- m = 0 because didn't mention pattern subscriptions (psubscribe)
Comments
Post a Comment