Can we have a replice with only 1 primary and 1 secondary?

I only have 2 servers.

Is it possible to setup a Replicate with only 1 Primary and 1 Secondary ?

Thanks

Nico

In that case, I usually add an arbiter to the secondary server

  • Server 1 - Primary
  • Server 2 - Secondary / Artbiter

Hi Nicolas - Welcome to the community :wave:

Just curious for the use case here for a replica set with 2 members? As per the Operations Checklist documentation regarding replication:

  • Ensure that your replica set contains an odd number of voting members.

I would also highly recommend going over the following post into a similar scenario (with the exception of an arbiter(s) and why you should not use them as per stennie’s comment)

Regards,
Jason