Skip to content

Commit 7998956

Browse files
authored
docs(NODE-3643): Discuss connection pool size options in 4.0 upgrade guide (#2992)
1 parent 440517e commit 7998956

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/CHANGES_4.0.0.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,15 @@ stream.on('end', () => client.close());
132132
### MongoClientOptions interface
133133

134134
With type hinting users should find that the options passed to a MongoClient are completely enumerated and easily discoverable.
135-
In 3.x there were options, like `maxPoolSize`, that were only respected when `useUnifiedTopology=true` was enabled, vs `poolSize` when `useUnifiedTopology=false`.
136-
We've de-duped these options and put together some hefty validation to help process all options upfront to give early warnings about incompatible settings in order to help your app get up and running correctly quicker!
135+
136+
#### Connection Pool Options
137+
In driver 3.5, we introduced some new connection pool-related options -- `maxPoolSize` and `minPoolSize` -- which were only respected when `useUnifiedTopology` was set to `true`. These options had legacy equivalents named `poolSize` and `minSize`, respectively, which could be used both with and without `useUnifiedTopology` set to `true`.
138+
139+
In driver 4.0, the legacy options have been removed, and only `maxPoolSize` and `minPoolSize` are supported. We have added options validation which should help you identify any usages of the old names.
140+
141+
Please note that the default value for the maximum pool size has changed over time. In driver 3.x **without** `useUnifiedTopology` set to `true`, the default value was 100. In driver 3.x **with** `useUnifiedTopology` set to true, the default was 10.
142+
143+
In this release, we have changed the default value for `maxPoolSize` to 100, in compliance with the drivers [connection pooling specification](https://github.com/mongodb/specifications/blob/master/source/connection-monitoring-and-pooling/connection-monitoring-and-pooling.rst).
137144

138145
#### Unified Topology Only
139146

0 commit comments

Comments
 (0)