[rabbitmq-discuss] RabbitMq Server how to make master-slave and master-backup ?
Simon MacMullen
simon at rabbitmq.com
Wed Nov 27 10:26:43 GMT 2013
On 26/11/13 07:25, Michael Klishin wrote:
> On 26 Nov 2013, at 10:15, 3k4b251 <314992959 at qq.com> wrote:
>
>> rabbitmq server use
>> one, and copy data to the other database at the same time or a
>> time later .
>
> It’s only safe to copy Mnesia directory when RabbitMQ node that uses it is not running.
Depends how safe you want to be. It *is* possible to do active/passive
failover by having two brokers share one data directory; we documented
one such approach here:
http://www.rabbitmq.com/pacemaker.html
There are multiple disadvantages though:
* Setting it up is a PITA.
* At failover the "spare" broker will need to rebuild indexes from
scratch (possibly taking a long time).
* The safety of (confirmed) messages is less guaranteed than with
mirrored queues. In practice you tend not to lose much if anything. But
in theory everything could vanish.
* As with all active / passive systems failover is such a big deal that
you never tend to test it.
So that's why we recommend mirrored queues instead. Or...
> If you want a hot standby, use Shovel or federated exchanges to replicate messages.
...these are also good options.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list