Summary
Supply a mechanism to limit the number of mongos servers used in connecting to sharded clusters.
Motivation
Connections using cluster SRV records having many mongos addresses can result in very large numbers of connections to mongos servers. This can lead to a variety of severe performance issues resulting from rapid buildup of connections, both to mongos servers, as well as from mongos servers to shard mongod servers. Limiting the mongos servers used in connecting to clusters has been found to help in reducing high connection counts and associated negative performance impacts.
Who is the affected end user?
Customers on Atlas using sharded clusters. Per each cluster, Atlas creates 3 mongos. For example, a 25 shard cluster will have 75 mongos instances. Since we default to using an SRV connection string, the MongoDB drivers will effectively have to manage connections to all 75 mongos instances. In one customer's case, with a large number of application servers, this results in between 10,000 and 13,000 connections to each mongos.
How does this affect the end user?
A large number of connections to each mongos leads to excessive memory usage by each mongos and on application servers.
Is this issue urgent?
No, customer has PS designing a workaround
Is this ticket only for tests?
No
Is this ticket required by a downstream team?
No
Cast of Characters
Engineering Lead:
Document Author:
POCers:
Product Owner: Rachelle Palmer
Program Manager:
Stakeholders:
- depends on
-
CDRIVER-4247 #cmakedefine01 preprocessor directives conflicts with PHPC's autotools build system
- Closed
-
PHPC-1647 Defer to libmongoc for cross-option URI validation
- Closed
-
CDRIVER-4097 Provide options to limit number of mongos servers used in connecting to sharded clusters
- Closed
- has to be finished together with
-
PHPC-2016 Remove srvMaxHosts tests expecting an error for invalid values
- Closed
- related to
-
PHPC-1900 Allow custom service names with srvServiceName URI option
- Closed