Replica set members

All,
What is the limitation of number of members I can have in a replica set? Also can I have two members with the same _id but different ports?
Also can I have same port number across multiple members in the set?

Thanks

Hope this helps.

Replica sets can go up to 50 members, which may be useful if you want copies of the data around the world, close to the users/applications or just for redundancy. But only a maximum of 7 of those members can be voting members. More than 7 could cause voting rounds to take too long., with little to none benefit. Any one of the 7 can become the primary, the rest being electable in case it’s topology changes.

Within the following video: -

https://university.mongodb.com/mercury/M103/2019_January/chapter/Chapter_2_Replication/lesson/5a9b412e97182d4140a45eaf/tab/5a9b412e97182d4140a45eb0

No duplication on port numbers, if you try to add a member with the same port number you get a mongo error.

1 Like