rabbitmq在高可用HA方面的方案总结

本文总结了rabbitMQ实现高可用性的集群方案,探讨了普通集群的特点,包括exchange和queue的数据分布策略,以及为何queue仅在一个节点存储contents。官方观点指出,这种设计旨在避免额外的存储空间需求及性能下降。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

为了提高消息传递交付的可用性,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).

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值