Can we create a 3 node replica set where primary will be in OCI and 2 secondaries in On-premises

Can we create a 3 node replica set where primary will be in OCI and 2 secondary’s in On-premises?

My question is if we create this setup will replication take place in first place and during primary outage will on -prem secondary turns to be primary node?

Also if u have other possible way to design it helps with diagram.

I don’t think there will be any issue. For our use case, we have some nodes on premise, and one backup node in k8s (AWS). No issue ever.

As long as your nodes can talk to each other, who cares where they are hosted.

This is perfectly fine and will work.

There are active companies with redundancies in Atlas set to Azure Cloud, AWS MongoDB Hosting, Alibaba MongoDB Hosting, and various on premise locations across Europe, Asia, and the US for full redundancy of their services to prevent outages etc. Full-scale failover protections. Even for their mobile applications using Device Sync and Realm doing this.

There shouldn’t be any issues beyond your generation configs/architectural layout that would be any kind of source of conflict in doing this.