[DRIVERS-1943] Make maxConnecting configurable Created: 05/Oct/21  Updated: 22/Jan/24

Status: Implementing
Project: Drivers
Component/s: CMAP, Performance
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Boris Dogadov Assignee: Valentin Kavalenka
Resolution: Unresolved Votes: 2
Labels: size-small, spec-change
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CSHARP-3885 [Unconfigurable] connection rate limi... Closed
Duplicate
duplicates JAVA-4288 Allow configuration of MAX_CONNECTING... Closed
Issue split
split to RUST-1096 Make maxConnecting configurable Backlog
split to CDRIVER-4218 Make maxConnecting configurable Closed
split to CSHARP-3952 Make maxConnecting configurable Closed
split to CXX-2413 Make maxConnecting configurable Closed
split to GODRIVER-2219 Make maxConnecting configurable Closed
split to MOTOR-856 Make maxConnecting configurable Closed
split to NODE-3750 Make maxConnecting configurable Closed
split to PHPLIB-759 Make maxConnecting configurable Closed
split to PYTHON-3005 Make maxConnecting configurable Closed
split to RUBY-2840 Make maxConnecting configurable Closed
split to JAVA-4390 Make maxConnecting configurable Closed
Related
Driver Changes: Needed
Quarter: FY23Q1
Downstream Changes Summary:

Implement the new maxConnecting connection pool and connection string option as specified in this commit.

Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4218 Won't Do
CXX-2413 Won't Do
CSHARP-3952 Fixed 2.14.0
GODRIVER-2219 Done 1.8.2
JAVA-4390 Fixed 4.4.0
NODE-3750 Done 4.7.0
PHPLIB-759 Won't Do
PYTHON-3005 Fixed 4.0
MOTOR-856 Duplicate
RUBY-2840 Duplicate
RUST-1096 Backlog
SWIFT-1411 Duplicate

 Description   

Summary

The CMAP spec currently requires setting maxConnecting to 2. There are some user scenarios where this setting is not optimal, and degrades application performance.

Consider allowing users to configure maxConnecting setting.
Drivers should also provide documentation suggesting the default value of 2 (or other) for minimizing the risk of connection storms.

Motivation

Who is the affected end user?

Customers with workloads for which maxConnecting=2 causes degraded performance (see linked tickets).

How does this affect the end user?

Some users experience performance degradation, which is supposed to be addressed by this setting.

How likely is it that this problem or use case will occur?

Unclear, probably an edge case.

If the problem does occur, what are the consequences and how severe are they?

Degraded performance

Is this issue urgent?

This prevents some users from upgrading to the latest driver.

Is this ticket required by a downstream team?

No

Is this ticket only for tests?

No



 Comments   
Comment by Githook User [ 16/Nov/21 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: Implement maxConnecting tests from DRIVERS-1943 (#826)

JAVA-4405
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/cf1666a6d40067ba0edce0549ba2909b175f7cbc

Comment by Githook User [ 16/Nov/21 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: DRIVERS-1943 Make maxConnecting configurable (#1098)
Branch: master
https://github.com/mongodb/specifications/commit/ce242ddbb5377c509057e4e07b9d56c011bb0229

Comment by Gian Maria Ricci [ 05/Nov/21 ]

I've put a comment in related CSHARP-3885 [Unconfigurable] connection rate limiter in 2.13.x breaks existing applications - MongoDB Jira ticket, actually the value of 2 is rendering one of our large application almost unusable, performance degradation is so severe that we have some update in a collection with 200 documents taking 10 seconds because all threads are waiting to acquire a connection.

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