mongoDB replica set
问题 I am trying to understand the concept of replica sets in MongoDB. Taking a simple example of 2 mongoDB instances A (primary) and B (secondary). If my client is happily querying A I understand that writes get replicated to B but what happens if server A becomes inaccessible? Whilst in terms of mongo replication I can see that B gets elected as the new primary, how does the client know to now channel its queries to B and not A? Is this all done internally to mongo? I ask because my client's