可扩展的实时 Pub/Sub 引擎

发布于 2024-12-05 13:11:34 字数 489 浏览 2 评论 0原文

我正在寻找一个发布/订阅引擎,具有以下要求:

  1. 非常低的延迟 << 0.5 秒
  2. 可扩展
  3. 分片(基于地理本地化)

我希望能够拥有多个发布/订阅服务器,并且能够从任何服务器发布或订阅频道,无论在哪个服务器上声明频道。

例如:

如果用户 A 连接到服务器 SRV1用户 B 连接到服务器 SRV2,如果 >用户 B 订阅“MyChannel”,用户 A 在频道“MyChannel”上发布内容,用户 B< /strong> 即使他没有连接也会收到消息同一个服务器。

不知道Redis能不能做到这一点。我没有找到任何有关该主题的信息。

I'm looking for a pub/sub engine, with the following requirements:

  1. Very low latency < 0.5 sec
  2. Scalable
  3. Shardable (based on geo localisation)

I'd like to be able to have multiple pub/sub servers and be able to publish or subscribe to channels from any server, no matter on which server the channel is declared.

For example:

If user A is connected to server SRV1 and user B connected to server SRV2, If user B subscribe to "MyChannel" and user A publish something on channel "MyChannel", user B will get the message even if he's not connected to the same server.

I don't know if Redis is able to do that. I didn't find anything about the subject.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

世界等同你 2024-12-12 13:11:34

我们已经使用 ZeroMQ 及其发布/订阅功能一段时间了,我们对我们的功能非常满意正在看到。

下一个 版本 中的内容也值得一看(减少网络通过向上游推送订阅请求来获得带宽)

We've been using ZeroMQ and it's pub/sub features for while now and we're very happy with what we're seeing.

It's also worth looking at what's coming up in the next version (reducing network bandwidth by pushing subscription requests upstream)

南风起 2024-12-12 13:11:34

我建议您查看实时系统数据分发服务 (DDS) 标准。它专门设计为适用于实时和非实时系统的可扩展发布/订阅中间件。

它有一些成熟的实现,所有这些都有自己的优点,但通常这些实现都是可扩展的和低延迟的。

这些是我建议您查看的实现(如果您需要它们在 WAN 环境中工作,我想前两个对此有很好的支持):

I suggest you look at Data Distribution Service for Real Time Systems (DDS) standard. It's specifically designed to be a scalable pub/sub middleware both for real-time and non-real-time systems.

It has a few mature implementations all of which has it's own strength points, but generally the implementations are scalable and low latency.

These are the implementations I would suggest you look at (If you need them to work on a WAN environment, I guess the first two ones have great support for that):

好久不见√ 2024-12-12 13:11:34

您似乎正在寻找某种消息传递。尝试 RabbitMQ,使用 shovelfederation 插件

It seems you are looking for some sort of messaging. Try RabbitMQ, with shovel or federation plugins

奶气 2024-12-12 13:11:34

nanomsgZeroMQ,由同一作者编写,具有多种语言绑定。

它是用 C 编写的,并使用零复制机制。如果您正在寻找出色的延迟,并且愿意亲自动手(如果您的目标是极端的东西,那么您应该这么做),我会推荐这两者之一。

如果您正在寻找卓越的吞吐量,请选择 Kafka。

请注意,这些解决方案都没有实现开箱即用的地理定位,Redis 3.2 将具有以下功能: http://antirez.com/ news/89

如果您正在寻找一个简单的、“足够好”的解决方案,我会选择 Redis (请务必阅读 这篇来自 aphyr 的博客文章首先)。

nanomsg is a successor to ZeroMQ, written by the same author, and with many language-bindings.

It is written in C and uses zero-copy mechanisms. If you're looking for exceptional latency, and are willing to get your hands dirty ( which you should if you aim for something extreme ), I would recommend one of those two.

If you're looking for exceptional throughput, go with Kafka.

Note, none of those solutions implement geolocation out of the box, Redis 3.2 will have something : http://antirez.com/news/89

If you are looking for an easy, "good enough" solution, I'd go with Redis ( be sure to read this blog post from aphyr first ).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文