Configure MongoDB connection pooling - Fluid Topics - 3.7

Install Fluid Topics on Multiple Servers

Operating system
Debian
Category
Technical Notes
Audience
public
Version
3.7

Fluid Topics v3.7.42 introduces support for a connectionPool section in the mongo.conf.json file. Being able to configure connection pooling is useful for environments with a large number of tenants (10 or more).

The following lines show an example of a mongo.conf.json file with a connectionPool section:

{
"hosts": [
{
"hostname": "my-mongo-server"
}
],
"connectionPool": {
"minSize": 5,
"maxSize": 150,
"maxConnectionIdleTimeMs": 60000
}
}

Where:

minSize: The minimum number of connections. Connections are kept in the pool when idle, and the pool verifies that it contains at least this minimum number. The default value is 0.

maxSize: The maximum number of connections allowed. Connections are kept in the pool when idle. Once the maximum number of connections is reached, any operation requiring an additional connection will be blocked while waiting for an available connection. The default value is 100. If many tenants are installed, this setting should be increased to (100 + number_of_tenants) to prevent FT server performance issues.

maxConnectionIdleTimeMs: Returns the maximum idle time of a pooled connection in milliseconds. A 0 value indicates no limit to the idle time. A pooled connection that has exceeded its idle time will be closed and replaced when necessary by a new connection. The default value is 0.