Discussion:
[Bucardo-general] Multi-Master configuration in Bucardo
ning chan
2018-01-08 22:18:06 UTC
Permalink
Hi Bucardo experts,

I am new to bucardo and have a question about how should i setup
multi-master db using bucardo.

Here is the list commands I execute on each node:

Node#1
./bucardo add db mmdb01 dbname=test host=mmdb01 user=bucardo
./bucardo add db mmdb02 dbname=test host=mmdb02 user=bucardo
./bucardo add db mmdb03 dbname=test host=mmdb03 user=bucardo
./bucardo add all tables -T test1 herd=mmdb_herd
./bucardo add dbgroup mmdb_db_group mmdb01:source
./bucardo add dbgroup mmdb_db_group mmdb02:target
./bucardo add dbgroup mmdb_db_group mmdb03:target
./bucardo add sync mmdb_sync herd=mmdb_herd dbs=mmdb_db_group autokick=0
./bucardo validate mmdb_sync
./bucardo update sync mmdb_sync autokick=1
./bucardo start

Node#2
./bucardo add db mmdb01 dbname=test host=mmdb01 user=bucardo
./bucardo add db mmdb02 dbname=test host=mmdb02 user=bucardo
./bucardo add db mmdb03 dbname=test host=mmdb03 user=bucardo
./bucardo add all tables -T test1 herd=mmdb_herd
./bucardo add dbgroup mmdb_db_group mmdb02:source
./bucardo add dbgroup mmdb_db_group mmdb01:target
./bucardo add dbgroup mmdb_db_group mmdb03:target
./bucardo add sync mmdb_sync herd=mmdb_herd dbs=mmdb_db_group autokick=0
./bucardo validate mmdb_sync
./bucardo update sync mmdb_sync autokick=1
./bucardo start

Node#3
./bucardo add db mmdb01 dbname=test host=mmdb01 user=bucardo
./bucardo add db mmdb02 dbname=test host=mmdb02 user=bucardo
./bucardo add db mmdb03 dbname=test host=mmdb03 user=bucardo
./bucardo add all tables -T test1 herd=mmdb_herd
./bucardo add dbgroup mmdb_db_group mmdb03:source
./bucardo add dbgroup mmdb_db_group mmdb02:target
./bucardo add dbgroup mmdb_db_group mmdb01:target
./bucardo add sync mmdb_sync herd=mmdb_herd dbs=mmdb_db_group autokick=0
./bucardo validate mmdb_sync
./bucardo update sync mmdb_sync autokick=1
./bucardo start

Does it seems to be a reasonable setting for multi-master database?
Reason i asked is that as soon as one of the node is gone, it stall
replication right way, is that the expected behavior?

Thanks~
David Christensen
2018-01-08 22:25:35 UTC
Permalink
Hi Ning,

You should only run the bucardo commands on a single node (the server that you are running the “bucardo daemon” on). That node can be, but need not be, one of the database nodes. There is a single Bucardo daemon, not one that runs on each nose, so it is unnecessary (and unadvised) to have them running on each node.

When setting up a multi-master database cluster, you will just add each of the databases in the database groups as sources; it will work out that you mean to do a multi-master cluster.

Updating your example:

./bucardo add db mmdb01 dbname=test host=mmdb01 user=bucardo
./bucardo add db mmdb02 dbname=test host=mmdb02 user=bucardo
./bucardo add db mmdb03 dbname=test host=mmdb03 user=bucardo
./bucardo add all tables -T test1 herd=mmdb_herd
./bucardo add dbgroup mmdb_db_group mmdb01:source
./bucardo add dbgroup mmdb_db_group mmdb02:source
./bucardo add dbgroup mmdb_db_group mmdb03:source
./bucardo add sync mmdb_sync herd=mmdb_herd dbs=mmdb_db_group autokick=0
./bucardo validate mmdb_sync
./bucardo update sync mmdb_sync autokick=1
./bucardo start

As far as the stalling behavior, that is currently how Bucardo is written, so this is a known issue.

Best,

David
--
David Christensen
End Point Corporation
***@endpoint.com
785-727-1171
ning chan
2018-01-08 22:39:35 UTC
Permalink
Hi David,

Thanks for the quick response, just a follow up question on the stalled
situation.
When a node is lost, it is currently blocking replication (with your
suggested setup above).
What is the proper procedure to restore replication for the rest of cluster
(exclude the bad node)?

Thanks~
Ning
Post by David Christensen
Hi Ning,
You should only run the bucardo commands on a single node (the server that
you are running the “bucardo daemon” on). That node can be, but need not
be, one of the database nodes. There is a single Bucardo daemon, not one
that runs on each nose, so it is unnecessary (and unadvised) to have them
running on each node.
When setting up a multi-master database cluster, you will just add each of
the databases in the database groups as sources; it will work out that you
mean to do a multi-master cluster.
./bucardo add db mmdb01 dbname=test host=mmdb01 user=bucardo
./bucardo add db mmdb02 dbname=test host=mmdb02 user=bucardo
./bucardo add db mmdb03 dbname=test host=mmdb03 user=bucardo
./bucardo add all tables -T test1 herd=mmdb_herd
./bucardo add dbgroup mmdb_db_group mmdb01:source
./bucardo add dbgroup mmdb_db_group mmdb02:source
./bucardo add dbgroup mmdb_db_group mmdb03:source
./bucardo add sync mmdb_sync herd=mmdb_herd dbs=mmdb_db_group autokick=0
./bucardo validate mmdb_sync
./bucardo update sync mmdb_sync autokick=1
./bucardo start
As far as the stalling behavior, that is currently how Bucardo is written,
so this is a known issue.
Best,
David
--
David Christensen
End Point Corporation
785-727-1171 <(785)%20727-1171>
Tyler Hains
2018-01-18 14:17:19 UTC
Permalink
David,

The whole point of clustering is to remove single points of failure. How does one set up bucardo on multiple nodes so that you don’t end up with the only bucardo daemon offline, and effectively without a cluster?

Tyler Hains
Independent Consultant

From: bucardo-general-***@bucardo.org [mailto:bucardo-general-***@bucardo.org] On Behalf Of David Christensen
Sent: Monday, January 08, 2018 5:26 PM
To: ning chan <***@gmail.com>
Cc: bucardo-***@bucardo.org
Subject: Re: [Bucardo-general] Multi-Master configuration in Bucardo

Hi Ning,

You should only run the bucardo commands on a single node (the server that you are running the “bucardo daemon” on). That node can be, but need not be, one of the database nodes. There is a single Bucardo daemon, not one that runs on each nose, so it is unnecessary (and unadvised) to have them running on each node.

When setting up a multi-master database cluster, you will just add each of the databases in the database groups as sources; it will work out that you mean to do a multi-master cluster.

Updating your example:

./bucardo add db mmdb01 dbname=test host=mmdb01 user=bucardo
./bucardo add db mmdb02 dbname=test host=mmdb02 user=bucardo
./bucardo add db mmdb03 dbname=test host=mmdb03 user=bucardo
./bucardo add all tables -T test1 herd=mmdb_herd
./bucardo add dbgroup mmdb_db_group mmdb01:source
./bucardo add dbgroup mmdb_db_group mmdb02:source
./bucardo add dbgroup mmdb_db_group mmdb03:source
./bucardo add sync mmdb_sync herd=mmdb_herd dbs=mmdb_db_group autokick=0
./bucardo validate mmdb_sync
./bucardo update sync mmdb_sync autokick=1
./bucardo start

As far as the stalling behavior, that is currently how Bucardo is written, so this is a known issue.

Best,

David
--
David Christensen
End Point Corporation
***@endpoint.com<mailto:***@endpoint.com>
785-727-1171


This email and its content belong to Ingenico Group. The enclosed information is confidential and may not be disclosed to any unauthorized person. If you have received it by mistake do not forward it and delete it from your system. Cet email et son contenu sont la propriété du Groupe Ingenico. L’information qu’il contient est confidentielle et ne peut être communiquée à des personnes non autorisées. Si vous l’avez reçu par erreur ne le transférez pas et supprimez-le.

The information contained in this email and any attachments is private and is the confidential property of Ingenico Group. If you are not the intended recipient(s) or have otherwise received this email in error, please delete this email and inform the sender as soon as possible. Neither this email nor the information contained in any attachments may be disclosed, stored, used, published or copied by anyone other than the intended recipient(s). All orders for Ingenico Group products and services are accepted by Ingenico Group subject to the terms and conditions of sale set forth on the Ingenico Groups website, as such terms and conditions of sale may be changed from time to time without notice.
Loading...