[SERVER-9984] MongoS spawns new connections to secondaries after each change of readPreference tags Created: 21/Jun/13  Updated: 10/Dec/14  Resolved: 30/Jun/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.4
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: David Hows Assignee: Randolph Tan
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Sharded cluster
Replica Sets of 3
primary and one secondary tagged "a"
other secondary tagged "b"


Issue Links:
Depends
depends on SERVER-7629 Make DBClientReplicaSet draw connecti... Closed
Duplicate
duplicates SERVER-9788 mongos does not re-evaluate read pref... Closed
Related
Participants:

 Description   

Issue is thus:
Client creates a single connection to MongoS
Client issues a query with read preference "Secondary" and read preference tag of "a"
MongoS creates a new connection to secondaries tagged "a" and issues queries
Client issues a query with read preference "Secondary" and read preference tag of "b"
MongoS dropps connection to secondaries tagged "a" and opens connections to secondaries tagged "b" then issues queries
Client issues a query with read preference "Secondary" and read preference tag of "a"
MongoS dropps connection to secondaries tagged "b" and opens connections to secondaries tagged "a" then issues queries

If the client continues to change read preference tags then connections will be opened and closed following each query issued on that connection with a new tag. This can lead to large amounts of connection churn.


Generated at Thu Feb 08 03:21:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.