MongoDB settings
When creating or editing a Managed Service for MongoDB cluster, you can specify settings that pertain to MongoDB.
The label next to the setting name helps determine which interface is used to set the value of this setting: the management console, CLI, API, or API.
Depending on the selected interface, the same setting may be represented in a different way. For example, Max incoming connections in the management console is:
max_incoming_connections
in gRPC or CLI.maxIncomingConnections
in the REST API.
The following settings are only available for the Managed Service for MongoDB cluster Enterprise edition.
In a sharded cluster, some settings are only available to certain host roles.
Settings dependency on the host class
The values of some MongoDB settings can be automatically adjusted when you change the host class:
- If the values were not specified or are not suitable for the new class, the default settings for this class will be applied.
- If the settings you specified manually are suitable for the new class, they will not change.
The settings that depend on the host class are:
Cluster-level DBMS settings
-
Audit log
Management console
CLI
API
Audit system log
settings, which are only available for the Managed Service for MongoDB cluster Enterprise version.-
Filter
This setting defines which audit events will be logged. The input parameter is any field from an audit message
in JSON string format.For example, to only log audit events related to a user named
example-user
, specify the following:{"user": "example-user"}
For more information, see the MongoDB documentation
. -
Runtime configuration
This setting allows you to change filter configuration during the server runtime.
For more information, see the MongoDB documentation
.
-
-
Net → Max incoming connections
Management console
CLI
API
Maximum number of inbound connections.
The minimum value is
10
. The maximum value depends on the selected host class and is equal to the host's RAM volume in MB, with a maximum of16384
. Default value:1024
.For more information, see Connection limits.
-
Operation profiling
Management console
CLI
API
Note
This setting is unavailable for hosts with the
MONGOS
role in a sharded cluster.DBMS profiler settings. The profiler collects query data and then uses it to determine a query optimization strategy.
-
Mode
DBMS profiler mode:
off
: Profiling is disabled.slowOp
(default): Only collects information about slow operations (that take longer than the threshold value specified in the Slow op threshold setting).all
: Collects information about all queries in progress.
For more information, see the MongoDB documentation
. -
Slow op threshold
Sets the operation execution time (in milliseconds). If exceeded, the operation is considered slow.
The minimum value is
0
and the maximum value is36000000
(10 hours). The default value is300
.For more information, see the MongoDB documentation
.
-
-
Security
Management console
CLI
API
Settings of storage data encryption at rest, which are only available for the Managed Service for MongoDB cluster Enterprise version.
Data is encrypted using the Key Management Interoperability Protocol (KMIP).
For more information, see the MongoDB documentation
.-
Enable encryption
This setting enables encryption for data in the storage.
For more information, see the MongoDB documentation
. -
Kmip
KMIP server connection settings.
For more information, see the MongoDB documentation
.-
Client certificate
Path to the client certificate that is used by MongoDB for authentication on the KMIP server.
For more information, see the MongoDB documentation
. -
Key identifier
Unique ID of the encryption key on the KMIP server.
If it is not specified, MongoDB will request the KMIP server to create a new key, and will use it.
If the KMIP server has no key with the specified ID or the data is already encrypted with a different key, MongoDB will return an error.
For more information, see the MongoDB documentation
. -
Port
Number of the port used to communicate with the KMIP server.
If the Server name field lists multiple servers, MongoDB will use the specified port at an attempt to connect to each of them.
For more information, see the MongoDB documentation
. -
Server ca
Path to the CA certificate file.
The certificate confirms that a client connection to the KMIP server is secure.
For more information, see the MongoDB documentation
. -
Server name
Domain name or IP address of the KMIP server MongoDB connects to.
You can specify multiple KMIP servers as a comma-separated list without spaces, such as:
server1.example.com,server2.example.com
. In this case, MongoDB will try to connect to each server, one by one, in the specified order and establish a connection to the first available server.For more information, see the MongoDB documentation
.
-
-
-
Storage
Management console
CLI
API
Note
This setting is unavailable for hosts with the
MONGOS
role in a sharded cluster.Hosts with the
MONGOCFG
role only have the Engine config → Cache size gb setting available.Settings that define how MongoDB works with the storage
.-
Journal → Commit interval
The interval in milliseconds between when MongoDB journal data
is written to disk.The minimum value is
1
and the maximum value is500
. The default value is300
.For more information, see the MongoDB documentation
. -
Wired tiger
Settings for the storage engine
:-
Collection config → Block compressor
Data compression option. The value set here only applies to new collections. You can also redefine it for individual collections
and indexes .none
: Compression is disabled.snappy
: Data is compressed using the snappy library. If you select this setting, data compression and decompression will be, in most cases, faster than if you use thezlib
library; however, the resulting file size will be 20% to 100% larger.zlib
: Data is compressed using the zlib library. This method is slower than using thesnappy
library, but, in most cases, it compresses data better.
For more information, see the MongoDB documentation
. -
Engine config → Cache size gb
Maximum size of the internal cache used for data storage (in GB). This setting does not affect the amount of RAM used to create an index.
The minimum value is
0.25
(256 MB). The maximum and default values depend on the selected host class and are determined by these formulas:- The maximum value is
0.9 × <amount_of_RAM_per_host>
. - The default value is
0.5 × <amount_of_RAM_per_host>
.
For example, for s1.medium (8 vCPU, 32 GB) class hosts, the maximum value of the setting is
28.8
, the default value is16
.For more information, see the MongoDB documentation
. - The maximum value is
-
-