Odd or Even Number of Nodes

Moderator: NorbertKrupa

Post Reply
Brett
Beginner
Beginner
Posts: 49
Joined: Fri Oct 11, 2013 1:19 am

Odd or Even Number of Nodes

Post by Brett » Mon Oct 27, 2014 7:25 pm

Hi guys,

Is it better to have an odd or even number of nodes in a Vertica cluster?

Thanks

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Odd or Even Number of Nodes

Post by NorbertKrupa » Mon Oct 27, 2014 7:32 pm

For high availability, you need at least 3 nodes. Depending on the workload, you plan number of nodes accordingly. Having odd/even makes no difference unless you're extremely obsessive–compulsive.
Checkout vertica.tips for more Vertica resources.

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: Odd or Even Number of Nodes

Post by Julie » Tue Oct 28, 2014 4:00 pm

Isn't it true that having an even number of nodes does not give you better HA than the even number of nodes minus 1? That is, if a database has a k-safety of 1 and if you have 6 nodes the HA isn't any better than having 5 nodes? In either case you can lose two nodes, but if you lose three the database will go down.

Also, I heard that you shouldn't have an even number of nodes because of the "split-brain" phenomenon in that if half the nodes go down then Vertica is unable to determine which of the nodes remaining should be the control nodes.

This is just what I've heard/read. I have no actual empirical data to back up these statements :)

Anyone else agree/disagree?
Thanks,
Juliette

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Odd or Even Number of Nodes

Post by NorbertKrupa » Tue Oct 28, 2014 4:58 pm

From The Vertica Analytic Database: C-Store 7 Years Later on cluster integrity:
As in C-Store, Vertica provides the notion of K-safety: With K or fewer nodes down, the cluster is guaranteed to remain available. To achieve K-Safety, the database projection design must ensure at least K+1 copies of each segment are present on different nodes such that a failure of any K nodes leaves at least one copy available. The failure of K+1 nodes does not guarantee a database shutdown. Only when node failures actually cause data to become unavailable will the database shutdown until the failures can be repaired and consistency restored via recovery. A Vertica cluster will also perform a safety shutdown if N/2 nodes are lost where N is the number of nodes in the cluster. The agreement protocol requires a N/2 + 1 quorum to protect against network partitions and avoid a split brain effect where two halves of the cluster continue to operate independently.
In the K-safety(1) diagram below, the buddy projection is in the next higher node:

Image

This means, if node 2 fails, the cluster is would stay up. If node 2 & 4 failed, the cluster would stay up:

Image

However, if an adjacent node fails, the cluster would shutdown because there are no available copies of the data. It wouldn't matter if you have 4 vs. 5 nodes, or 12 vs. 13.

Image

Documentation
Checkout vertica.tips for more Vertica resources.

Post Reply

Return to “Vertica Database Administration”