How many member replicaSet should i configure across 2 availability zone to achieve complete HA.
Thanks!
Vineet
vineet khanna
unread,
Aug 27, 2014, 1:52:57 AM8/27/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Anyone can help here.
Should i go for 5 member replicaSet or 7 member replicaSet.
Asya Kamsky
unread,
Sep 2, 2014, 12:36:49 AM9/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
What exactly do you mean by "complete HA"? If you have 2
availability zones and you're worried about losing an entire
availability zone, you cannot increase your fault-tolerance by having
more members - you would have to have a third location for the last
(odd) member then.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Thanks Asya for the clarification.
"complete HA" means same if one availability zone goes down mongo cluster should be working properly.
Asya Kamsky
unread,
Sep 2, 2014, 1:00:31 PM9/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Right, got it.
Since majority of nodes is needed to elect a primary (or keep existing
primary from stepping down) no matter how many nodes you have, if they
are all in two availability zones, then necessarily the majority will
be in one (and minority in the other). Losing the AZ the majority is
in will lose write availability.
The only way around that is to have N nodes where N is odd. Have
(N-1)/2 number of nodes in each of the two AZs and have an arbiter or
Nth node somewhere else that's not in either of those availability
zones. This applies whether N is 3, 5, or 7.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Thanks Asya for the detailed description and workaround.
Arbiter option seems reasonable to me, will try and test this scenario.
Just one concern backup node with
"votes" : 0,
"priority" : 0
Will considered as a member in this situation.
Just wanted to know in (N-1)/2 formula, should i consider backup node.
Tehmasp Chaudhri
unread,
Sep 3, 2014, 1:41:46 AM9/3/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
I can tell you from my experience - in AWS VPC - where you will have 3 AZs to use - I've done 2 (AZ1), 2 (AZ2), 1 Aribiter (AZ3) to great success. Echoing Asya's reply.
vineet khanna
unread,
Sep 3, 2014, 4:51:00 PM9/3/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Thanks for the suggestion Tehmasp. that's the suitable option if you have 3 AZs but in Singapore only 2 AZs are available.
Asya Kamsky
unread,
Sep 4, 2014, 4:30:52 AM9/4/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
I would recommend against setting votes to 0 on the backup node -
having 0-vote nodes makes it much harder to reason about majority and
durable writes...