Replica set members

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?


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: -

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

1 Like