I am exploring MongoDB replica-sets and I would like to know how to handle fail-over from the application.
Following is my scenario:
Lets assume I have a replica-set with three nodes, say A(Primary), B(Secondary) and C(Secondary).
1.From my application, which host should I connect to? A?
2.What will happen when host A fails? One secondary (say B) will take over as primary. Should my application be designed to handle this transition and connect to B now?
Thanks in advance. I have been confused on how to design the application while maintaining High Availability with replica-sets.