Hey Guys,
We have a MongoDB replica set (rs0
) with the following members:
10.*.*.13
– Primary10.*.*.16
– Secondary10.*.*.25
– Arbiter
Our application connection string is as follows:
mongodb://readwrite:***********@10.*.*.13,10.*.*.16:27017/?replicaSet=rs0
We are not directly including the arbiter node (10...25) in the connection string, yet we are observing that application connections are hitting the arbiter.
We would like to understand:
- Why is this happening even though the arbiter is not part of the connection string?
- Is this expected behavior from the MongoDB driver?
- Is there any recommended way to prevent applications from connecting to the arbiter while keeping it functional for replica set elections?
Below is my arbiter nide connection status.
rs0 [direct: arbiter] test> db.serverStatus().connections
{
current: 9940,
available: 390060,
totalCreated: 6429991,
active: 5022,
threaded: 9940,
exhaustIsMaster: 522,
exhaustHello: 4502,
awaitingTopologyChanges: 5021
}