Is it Possible to configure Mongo db replica set in Hybrid environment. Primary server on VM and Secondary server on Containers

Hi,
Today we got query from one of our client related to replica set implementation. we are looking for the following Architecture:

==> Primary Server on VM.
==> 3- Secondary Servers (Replica) on Containers

Is it possible to have such Hybrid/heterogeneous environment?

Please guide.

The short answer is yes, granted you have all of your networking requirements/definitions/DNS sorted out.

I see no benefit to this architecture, mixing cattle and pets together. I would nudge them toward 100% Docker Compose or Kubernetes operator, based on scale requirements.

Thanks Allen,
do we have any official compatibility matrix from Mongo db?

Not that I am aware of, but as long as the base version, OS distribution and the architecture is the same, it should work.

Nobody ever cares where/how you run those servers (thanks to abstraction in VM/containers/hardware…), as long as they can be set up running and connect to each other.

1 Like