[DRIVERS-2482] Reduce serverSelectionTimeoutMS default value Created: 25/Oct/22  Updated: 18/Oct/23

Status: Backlog
Project: Drivers
Component/s: Server Selection
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Alex Bevilacqua Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: FY24Q2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by RUBY-2301 Reduce default server selection timeo... Closed
Issue split
split to CDRIVER-4514 Reduce serverSelectionTimeoutMS defau... Blocked
split to CSHARP-4383 Reduce serverSelectionTimeoutMS defau... Blocked
split to CXX-2607 Reduce serverSelectionTimeoutMS defau... Blocked
split to GODRIVER-2610 Reduce serverSelectionTimeoutMS defau... Blocked
split to JAVA-4793 Reduce serverSelectionTimeoutMS defau... Blocked
split to MOTOR-1057 Reduce serverSelectionTimeoutMS defau... Blocked
split to NODE-4768 Reduce serverSelectionTimeoutMS defau... Blocked
split to PHPLIB-1030 Reduce serverSelectionTimeoutMS defau... Blocked
split to PYTHON-3491 Reduce serverSelectionTimeoutMS defau... Blocked
split to RUBY-3167 Reduce serverSelectionTimeoutMS defau... Blocked
split to RUST-1527 Reduce serverSelectionTimeoutMS defau... Blocked
Related
Driver Changes: Needed
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4514 Blocked
CXX-2607 Blocked
CSHARP-4383 Blocked
GODRIVER-2610 Blocked
JAVA-4793 Blocked
NODE-4768 Blocked
MOTOR-1057 Blocked
PYTHON-3491 Blocked
PHPLIB-1030 Blocked
RUBY-3167 Blocked
RUST-1527 Blocked
SWIFT-1673 Won't Do

 Description   

The default serverSelectionTimeoutMS of 30000 may be too long a default that negatively impacts application resilience.

In general 30 seconds is too long as the server is likely unavailable and unlikely to recover within the 30 seconds. Additionally 30 seconds may match other service timeouts (ex: Heroku's Request Timeout) which when overlapped can result in user-facing errors.

Lowering the default to something like 15000 would ensure it remains above the heartbeatFrequencyMS default of 10000 and may improve application resilience by allowing faster server selection.

Note this proposed change would only impact the default value of serverSelectionTimeoutMS, which can still be configured by users as needed. There should also be no impact to Client Side Operations Timeout as serverSelectionTimeoutMS is not being deprecated.



 Comments   
Comment by Shane Harvey [ 18/Oct/23 ]

Linking DRIVERS-1262 since that project would expand the scope of serverSelectionTimeoutMS.

Comment by Tom Selander [ 25/Oct/22 ]

Leads Triage: Good with this, should be small spec change and some tests around the URI.

 

Might be a good quick win for FY23Q4?

Generated at Thu Feb 08 08:25:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.