5 ms·
Could someone ELI5 what's a redis stream ? I thought that pub/sub mecanisms were some kind of a stream already.
by netgusto 9y ago
Could someone ELI5 what's a redis stream ? I thought that pub/sub mecanisms were some kind of a stream already.
- luhn 9y agoRedis Pubsub is fire-and-forget, so if you aren't listening when a message is fired, you'll never receive it. Redis Streams store messages, so you can connect and read all the messages since you last checked. It's a similar model to Kafka.
- eropple 9y agoI've not been following Redis a lot, so this one is new to me. I read antirez's original Streams blog post[0] but it feels like it's missing some stuff--is it known out there how this interacts with Redis Sentinel or, separately, Redis Cluster? [0] - http://antirez.com/news/114 http://antirez.com/news/114
- itamarhaber 9y agoIn the Redis sense, streams are just a new data structure (value type of a key), so there shouldn't be any special concerns with regards to Sentinel, partitioning and/or clustering in that sense.
- eropple 9y agoThat is my intuition, yeah, but that makes me pretty worried about hammering hot keys and the like with regards to Cluster. I also don't mind running Kafka, though, so I may not be the target audience.
- viperscape 9y agois it strictly in-mem? for instance if redis is restarted is there an option for unread streams to be saved with redis persistence
- luhn 9y agoThe built-in persistence mechanisms should be compatible with Streams.
- netgusto 9y agoFound the rationale for this: https://github.com/redis/redis-rcp/blob/master/RCP11.md#rationale https://github.com/redis/redis-rcp/blob/master/RCP11.md#rati...
- stergios 9y agoRedis streams will allow for direct modeling of time series data. For example, redis-cli>XADD AAPL 1516899637000.0 open 221.25 high 222.1 low 220.90 close 221.50 volume 1121223234234 (All data is imaginary.)
- pselbert 9y agoThis article from Brandur does a great job of explaining a use case for Redis Streams [0]. As part of that he begins by explaining what they are, how they work, and a bit about how they differ from Kafka. [0]: https://brandur.org/redis-streams https://brandur.org/redis-streams