Can I adjust the time zone setting of the instance
Since it is not possible to adjust the time zone setting of DDS, you can do so by getting the current time in the application and inserting it into a table.
What parameters of the instance do users need to pay attention to
storage.engine
This parameter is used to specify the storage engine used by MongoDB, which defaults to WiredTiger. You can choose other storage engines according to your needs, such as In-Memory engine or MMAPv1 engine.
storage.wiredTiger.engineConfig.cacheSizeGB
For MongoDB using the WiredTiger storage engine, this parameter is used to configure the cache size, which is the amount of memory used by the storage engine. Set an appropriate value according to the amount of data and available memory.
net.maxIncomingConnections
This parameter limits the number of connections that the MongoDB instance can process simultaneously. By setting this parameter appropriately, you can control the number of concurrent connections to MongoDB.
security.authorization
This parameter can be used to enable or disable the access control function of MongoDB. When set to true, authentication is required to access MongoDB.
MapReduce prompts that JavaScript is not supported
MapReduce is a powerful tool for processing and analyzing large data sets. However, for security and performance reasons, the use of JavaScript code may be restricted in some cases, including the execution of JavaScript code in MapReduce.
The purpose of this restriction is to reduce potential security risks, avoid improper code execution, and improve execution efficiency. The execution of JavaScript code may cause some potential problems, such as code injection attacks and performance degradation.
For security reasons, mongodb restricts the execution of JavaScript scripts by default.
DDS data consistency policy: use and limitations of writeConcern and readConcern
MongoDB writes and reads are two important aspects of database operations. To ensure the reliability and consistency of data, MongoDB provides two mechanisms: writeConcern and readConcern.
When we talk about writeConcern, we're really talking about the policy of write operation. By configuring writeConcern, we can control the behavior of data writes. For example, when we set writeConcern to the "majority" level, MongoDB ensures that data is written to the majority of nodes, thus reducing the risk of data loss. This means that even if some nodes fail, most nodes still keep the same data, which ensures the reliability of data.
And readConcern is the policy associated with read operation. When we set readConcern to the "major" level, MongoDB ensures that the read data is written to the majority of nodes. This eliminates the problem of dirty reads caused by read operations, as we can be confident that the read data has been confirmed by the majority of nodes.
However, it should be noted that currently, DDS does not directly support setting readConcern to the "major" level. But this does not prevent us from ensuring the consistency of data. By setting writeConcern to "majority", we can write data to most nodes, thus achieving data consistency for most nodes. Subsequently, by reading the data of a single node, it is still possible to ensure that the read content has been confirmed by the majority of nodes, avoiding the problem of dirty reads.