Setting replica set members to 1 still asking for secondary nodes
kpiyush17 opened this issue · 4 comments
Hi,
The quickstart provides options to choose from 1 or 3 member replica set.
I believe choosing 1 will create a standalone mongodb converted into replica set, right?
But, why it is mandatory to choose the secondary node's subnet if I am cluster replica set count as 1?
Thanks
Good question. It's because of the type of the parameter. To prevent the risk of typing errors, the parameter is not a String
type rather "AWS::EC2::Subnet::Id"
and hence we cannot give it a default value, e.g., ""
. Thus, you must supply a value for it. You can supply any subnet ID in the VPC, it won't get used. You may even repeat the primary subnet ID twice if you have only one subnet.
"Secondary0NodeSubnet": {
"Type": "AWS::EC2::Subnet::Id",
"Description": "Subnet-ID the existing subnet in your VPC where you want to deploy Secondary node(s)."
},
"Secondary1NodeSubnet": {
"Type": "AWS::EC2::Subnet::Id",
"Description": "Subnet-ID the existing subnet in your VPC where you want to deploy Secondary node(s)."
}
Thus, you must supply a value for it. You can supply any subnet ID in the VPC, it won't get used.
So, in the end, there will be one node?
I believe choosing 1 will create a standalone mongodb converted into a replica set, right?
What about this?
So, in the end, there will be one node?
Yes.
I believe choosing 1 will create a standalone mongodb converted into a replica set, right?
What about this?
Choosing 1 node will create a single member replica set.
Thanks for the help. Closing the issue.