We are using a mongo replica set of 4 members, and one arbiter. There are 3 physical sites, all mongo servers can talk to each other:
Site 1 (west coast) site1-mg01 site1-mg02
Site 2 (east coast) site2-mg03 site2-mg04
Site 3 (cloud, arbiter only) site3-mgarbiter
We have a Java client. I'd prefer the client never to connect to the Mongo servers in the other site, even if one of their servers becomes primary (lag will kill the app.) Or put a different way
Site 1 Java App connects to site1-mg01 and site1-mg02
Site 2 JavaApp connects to site2-mg03 and site2-mg04
Is it acceptable for a client to only know about part of a replica set? So if the web client can physically ONLY reach site 1, and I set up my replica set as follows:
"site1-mg01:270xx,site1-mg02:270xx"
Will my client be negatively impacted? The way I assume it works, is long as one of those servers is primary, it will connect fine? And if a Site 2 Mongo becomes the primary, I just can't connect?