Pub / Sub and Redis Clustering

This link says: "The current implementation simply translates all post messages to all other sites" and adds that this will be improved in the future.

For the current implementation: If message loss is not important; does it make sense to use redis for pub / sub? It seems that one instance is better to stop broadcast traffic. Because he writes nearby; reading should also be redirected to other nodes! (so the client will not be notified twice.)

Did I miss something?

+4
source share
1 answer

No, I donโ€™t think you missed a point. Redis Cluster is an ongoing effort and this includes specifications. The pub / sub section is pretty easy and can probably be improved.

In a statement to Salvatore, the client subscribes to one instance (not for everyone), therefore, when publications are broadcast in all instances, the client is notified only once. If the Redis instance does not work, the client can subscribe to one of the remaining cluster nodes (any other).

Another possibility would be to select one cluster node as a unique pub / sub node, so that clients can publish and subscribe only to that node. But the high availability of the pub / support service will be more difficult to support this method.

+5
source

Source: https://habr.com/ru/post/1437203/


All Articles