Why Are Application Connections Hitting the Arbiter Node in Our Replica Set?

Hey Guys,

We have a MongoDB replica set (rs0) with the following members:

  • 10.*.*.13 – Primary
  • 10.*.*.16 – Secondary
  • 10.*.*.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:

  1. Why is this happening even though the arbiter is not part of the connection string?
  2. Is this expected behavior from the MongoDB driver?
  3. 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
}