can a node work if it looses connectivity with the cluster

29 views
Skip to first unread message

bbnlaccts acnts

unread,
Jun 30, 2016, 12:41:24 AM6/30/16
to codership
Hi,
we are planning to run a 6 node maria db galera cluster.
if one of the node in a cluster looses a network connection, can that instance still operate with the clients and sync back once the network connectivity is restored?
In our 6 node cluster we will be hosting 6 seperate database on maria instance.


Please do let me know.
thanks in advance

Philip Stoev

unread,
Jun 30, 2016, 1:02:36 AM6/30/16
to bbnlaccts acnts, codersh...@googlegroups.com
Hello,

No, the node that lost the connection will refuse all queries until it is
able to rejoin to the rest of the cluster. It is possible to have the node
accept read queries for the duration, but such queries will be returning
stale data, so it is a risky proposition.

Also, a odd number of nodes is recommended for Galera, or an even number and
the use of an arbitrator.

Philip Stoev
--
You received this message because you are subscribed to the Google Groups
"codership" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to codership-tea...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bbnlaccts acnts

unread,
Jun 30, 2016, 1:22:02 AM6/30/16
to codership
thanks for the mail.

We are an isp here and we are using radius for authentication. these radius servers are in different geographical locations. we are planning to host the mariadb too along with the radius servers. the concern started when the network goes off the track. but during that time of failure, can we make this node as a read only server ?

Philip Stoev

unread,
Jun 30, 2016, 2:02:57 AM6/30/16
to bbnlaccts acnts, codersh...@googlegroups.com
Yes, it is possible for a node to be used as a read-only server in case of a
network partition, but it does not happen automatically.

The following things are required:
- detect the fact that the node became isolated by monitoring SHOW STATUS,
checking for a 1047 error on queries, or by using a wsrep_notify_cmd script
- force the node to begin accepting queries again by using SET
GLOBAL|SESSION wsrep_on=OFF
- make sure the clients are not allowed to issue write queries by using
appropriate user permissions or by using SET GLOBAL read_only=1
- after the node has rejoined the cluster, restore wsrep_on and read_only

The important thing would be to make sure that no update queries are run on
the connection while wsrep_on is OFF , as this will cause the cluster to
become inconsistent. Galera does not provide a built-in protection against
that, so that guarantee should be enforced by the user.

Philip Stoev

-----Original Message-----
From: bbnlaccts acnts
Sent: Thursday, June 30, 2016 08:22
To: codership
Subject: [codership-team] Re: can a node work if it looses connectivity with
the cluster


Philip Stoev

unread,
Jun 30, 2016, 4:39:50 AM6/30/16
to bbnlaccts acnts, codersh...@googlegroups.com
Sorry, I spoke too soon. There is an easier way to achieve the same
behavior:

https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_dirty_reads
Reply all
Reply to author
Forward
0 new messages