ActiveMQ学习笔记(八)—— 主从集群

搭建集群环境

消息的持久化和签收机制等都是为了保证消息的可靠性,但仅保证可靠性是不够的,有时我们还需要保证高可用性,这时就需要搭建ActiveMQ集群,以避免单点故障提升可用性。官方为我们介绍了三种集群搭建的方式

Master Slave Type Requirements Pros Cons
Shared File System Master Slave A shared file system such as a SAN Run as many slaves as required. Automatic recovery of old masters Requires shared file system
JDBC Master Slave A Shared database Run as many slaves as required. Automatic recovery of old masters Requires a shared database. Also relatively slow as it cannot use the high performance journal
Replicated LevelDB Store ZooKeeper Server Run as many slaves as required. Automatic recovery of old masters. Very fast. Requires a ZooKeeper server.

 5.6版本之后推出了LevelDB的持久化引擎,它使用自定义的索引代替常用的BTree索引,持久化性能高于KahaDB。虽然目前默认的持久化方式还是KahaDB,但是LevelDB会是趋势。5.9版本还提供了基于Zookeeper和LevelDB的数据主从复制方式(即Replicated LevelDB Store),是主从数据复制方案的首选。

集群工作原理

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值