15

Greetings,

I'm evaluating some components for a multi-data center distributed system. We're going to be using message queues (via either RabbitMQ or Qpid) so agents can make asynchronous requests to other agents without worrying about addressing, routing, load balancing or retransmission.

In many cases, the agents will be interacting with components that were not designed for highly concurrent access, so locking and cross-agent coordination will be needed to avoid race conditions. Also, we'd like the system to automatically respond to agent or data center failures.

With the above use cases in mind, ZooKeeper seemed like it might be a good fit. But I'm wondering if trying to use both ZK and message queuing is overkill. It seems like what Zookeeper does could be accomplished by my own cluster manager using AMQP messaging, but that would be hard to get really right. On the other hand, I've seen some examples where ZooKeeper was used to implement message queuing, but I think RabbitMQ/Qpid are a more natural fit for that.

Has anyone out there used a combination like this?

Thanks in advance,

-Chris

4

2 回答 2

6

这么晚了,但也许它会有一些用处。首要考虑的应该是系统的性能特征。就像你说的,ZooKeeper 不仅能够使用分布式队列实现任务分配系统,但是 zk 目前对读取的优化比对写入的优化(这只在每秒 1000 次操作范围内发挥作用) . 如果您的吞吐量需求低于此值,那么仅使用 zk 来实现您的系统将减少运行时组件的数量并使其更简单。当然,您应该始终在决定之前运行性能测试。

分布式协调真的很难做到正确,所以我绝对建议使用 zookeeper 而不是自己动手。

于 2011-06-25T06:21:23.777 回答
0

不太清楚 ZooKeeper 到底是什么,但我想在自己管理分布式同步和组服务等事情之前,最好使用 Apache 的组件(如果它确实满足您的需求)。您当然可以专门为此目的聘请开发人员团队,但这并不能保证您有更好的实施。

我想,无论如何它都会作为一个单独的组件实现,因为其他方式可能会带来很多复杂性并减慢工作流程;所以 ZooKeeper 或任何类似的偏好是显而易见的(对我来说)。

当然,除非您处于项目工作流程的全局优化阶段,否则我想使用 RabbitMQ 或类似的会更好(我什至要强调,因为 AMQP 的实现(尤其是商业)比一切都更可靠你会想出的)。

所以我会选择两者,仔细选择合适的第三方产品,但尽可能多地使用它们。这只是我的看法;谢谢阅读 :)

于 2010-05-31T05:48:25.743 回答