Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis Multiple Subscribers

I've have multiple subscribers who are subscribed to the same Redis channel. Does Redis guarantee that all subscribers get all the messages that are pushed into the channel after the subscribers subscribes for the channel ?

like image 350
Soumya Simanta Avatar asked Jun 22 '13 21:06

Soumya Simanta


People also ask

How many subscribers can Redis handle?

Regarding the number of subscribers and publishers, it is limited by the maxclients setting, 10,000 by default.

Is Redis good for pub sub?

Aside from data storage, Redis can be used as a Publisher/Subscriber platform. In this pattern, publishers can issue messages to any number of subscribers on a channel. These messages are fire-and-forget, in that if a message is published and no subscribers exists, the message evaporates and cannot be recovered.

How Pub/Sub works in Redis?

Redis and PHP Redis Pub/Sub implements the messaging system where the senders (in redis terminology called publishers) sends the messages while the receivers (subscribers) receive them. The link by which the messages are transferred is called channel. In Redis, a client can subscribe any number of channels.

How fast is Redis pub sub?

Redis Pub/Sub is designed for speed (low latency), but only with low numbers of subscribers. Subscribers don't poll and while subscribed/connected are able to receive push notifications very quickly from the Redis broker — in the low milliseconds, even less than 1 millisecond as confirmed by this benchmark.


1 Answers

From redis docs

Messages sent by other clients to these channels will be pushed by Redis to all the subscribed clients.

I guess thats a Yes to your question.

like image 160
Tommaso Barbugli Avatar answered Oct 06 '22 00:10

Tommaso Barbugli