4 ms·
High quality benchmark for one time! Thanks. A few remarks: 1) It's worth to try Redis 2.6 against this. It is possible that it will perform better or worse,
by antirez 14y ago
High quality benchmark for one time! Thanks.
A few remarks:
1) It's worth to try Redis 2.6 against this. It is possible that it will perform better or worse, not sure, but more probably better.
2) Believe it or not Redis Pub/Sub was never tuned for speed so far, nor profiled / optimized, because as far as I can tell nobody asked for more performances given that with the order of magnitude we can see with both Redis and ZMQ, it is pretty hard to hit the wall. However there are demanding applications, so probably it's worth doing it.
3) Maybe ZMQ only uses one core as well, otherwise to have an absolutely fair comparison, N Redis nodes should be used simultaneously. Pub/Sub is the kind of application where sharding sometimes it is really really easy, just by channel. In general with Redis you have three options to go distributed with Pub/Sub.
Option A) Have N nodes and shard by channel.
Option B) Use replication, as it also does PUBLISH of messages on slaves.
Option C) Use Redis Cluster, but currently it is in alpha. However it already does message propagation across all the cluster so it is very easy to implement a reliable HA Pub/Sub system with it. However currently the propagation is not smart, every message is propagated to every node, however in Redis the cost of Pub/Sub is proportional to the number of receivers, so this is usually not a big issue, but we'll improve this aspect in the future anyway.