赞
踩
为了提高消息传递交付的可用性,rabbitMQ有几种集群的方案,不同的方案有不同的优缺点
1、普通的集群
rabbitMQ中的exchange和queue都包含meta、contents、state等信息,exchange在集群中的每个节点都保存一份数据,
但是queue不一样,queue在集群中对于contents只存储一份,其他节点只存储meta信息
为什么只在一个节点存储queue的contents,官方是这么说的:
a、 Storage space—If every cluster node had a full copy of every queue, adding nodes
wouldn’t give you more storage capacity. For example, if one node could store
1 GB of messages, adding two more nodes would just give you two more copies
of the same 1 GB of messages.
b、 Performance—Publishing messages would require replicating those messages to
every cluster node. For durable messages, that would require triggering disk
activity on all nodes for every message. Your network and disk load would
increase every time you added a node, keeping the performance of the cluster
the same (or possibly worse).
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。