I'm newbie to mongodb replica sets and sharding..
I am setting up IP Failover on two servers. I set up DNS failover at AWS route 53 to switch the IP address in case the main server goes down. I also set up Mongo replica set across the main server and secondary server.
The problem is, the secondary server cannot write to the replica set (local instance) because it is secondary..
How could I set this up, so that when AWS switches the IP, traffic goes to the secondary server, (assuming primary mongodb is down)?
EDIT: Also set up file synchronisation between the primary and secondary server.