Galera Node Operation when Only One Single Node Left
As I know, for other brands of clustering, when more than half of the total nodes fail, the remaining node(s) may only allow read or even no operation is allowed for protecting the database integrity.
I have installed MariaDB 10.3.10 (with Galera installed as well) in three nodes. All of them join the cluster. It is amazing that when I updated one node, other two nodes updated as well. It is truly active-active configuration.
Then I shut down node 1 and 2 normally. Only node 3 left operating. I could insert, delete, update or even create table in the single node left. When I started node 1 and 2 later, both node 1 and 2 updated the changes I have made on node 3. No issues. It is not aligned to my previous knowledge that node failure more than half will cause issue.
So is the limitation on 'node failing more than half' not valid anymore on MariaDB 10.3.x?
-
Official comment
Hi,
The main difference is between "a node has failed" and "a node has been stopped". When you stop the node, it leaves the cluster in a graceful manner. As a result, the cluster size is reduced (from 3 to 2 and then later to 1). This has an impact on the fault tolerance of the cluster. If you have 3 nodes, one can fail as remaining two will have majority. If you stop one node, you'll have two. Any failure will result in a cluster in the non-Primary state. So, to sum it up, if you have three nodes, you can stop gracefully two of them but only one failure will be tolerated. I hope this makes it clear.
Thank,
Krzysztof
Comment actions -
You are correct. I have performed a test yesterday.
When two nodes were gracefully shut down, the one single node could operate normally (Primary status).
When one node failed, the two remaining nodes still operate normally (Primary status). When one more node failed, the single node left will be changed into non-Primary. It cannot be operate anymore, even 'select' operation was not allowed.
Please sign in to leave a comment.
Comments
2 comments