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
Is there a place that explains how clustering works with pub/sub? I looked through the docs I could find but may have missed this info.
Q: Do all nodes subscribe to traffic on other nodes to get notified of publish events that their clients might have interest in? i.e. does each node act as a client to the other nodes in the cluster automatically? If this were the case it seems like at a certain scale this would break down so I'm assuming there's something else going on there.
You may get better answers by asking the official mailing list, but I'll give a few hints here.
Do all nodes subscribe to traffic on other nodes to get notified of publish events that their clients might have interest in?
PubSub in Redis Cluster is very simple. Every PUBLISH to any Redis Cluster node gets copied to every other Redis Cluster node on the Redis Cluster inter-node cluster bus.
So, you can SUBSCRIBE to a channel on any Redis Cluster node then PUBLISH to the same channel on any other Redis Cluster node and the PUBLISH will reach every client attached to the cluster.
If this were the case it seems like at a certain scale this would break down so I'm assuming there's something else going on there.
The performance of large scale cluster PubSub has not been extensively tested yet, but computers are good at sending and receiving messages. You should be able to get pretty far before you reach any performance issues.
How do you scale an example like this once your traffic reaches a point where you need to use multiple redis nodes?
Adding more nodes to your Redis Cluster will help if your cluster nodes are currently too busy routing high throughput Pub/Sub messages. You can spread out your read load by adding more nodes, but it will also slightly increase your network noise as well over the cluster interfaces.
Reacted by Peter Petrov, Charles Holbrow, Istvan Pusztai, genie, Shahab Ganji, Elena Kolevska, max-lt and cashewcodes9
Activity
mattsta commentedon Aug 11, 2014
You may get better answers by asking the official mailing list, but I'll give a few hints here.
PubSub in Redis Cluster is very simple. Every
PUBLISHto any Redis Cluster node gets copied to every other Redis Cluster node on the Redis Cluster inter-node cluster bus.So, you can
SUBSCRIBEto a channel on any Redis Cluster node thenPUBLISHto the same channel on any other Redis Cluster node and thePUBLISHwill reach every client attached to the cluster.There currently isn't any fancy logic to route message only to nodes with actual live subscribers, but it could be added eventually. Also see the tiny "Publish/Subscribe" section of http://redis.io/topics/cluster-spec
The performance of large scale cluster PubSub has not been extensively tested yet, but computers are good at sending and receiving messages. You should be able to get pretty far before you reach any performance issues.
Adding more nodes to your Redis Cluster will help if your cluster nodes are currently too busy routing high throughput Pub/Sub messages. You can spread out your read load by adding more nodes, but it will also slightly increase your network noise as well over the cluster interfaces.
Update RedisTimeSeries module to v8.9.80 (#15336)