Updated on 2023-04-17 GMT+08:00

Reliability

  • Rules for setting write concern:

    For mission-critical services, set write concern to {w:n},n>0. A larger value indicates better consistency but poorer performance.

    • w:1 indicates that a confirmation message is returned after data is written to the primary node.
    • w:1,journal:true indicates that the result is returned after data is written to the primary node and logs.
    • w:majority indicates that the result is returned after data is written to more than half of the total nodes.

      If data is not written using w:majority, the data that is not synchronized to the standby node may be lost when a primary/standby switchover occurs.

  • If high reliability is required, deploy a replica set across three AZs.