zoukankan      html  css  js  c++  java
  • Mongo.setReadPref(mode, tagSet) primaries and secondaries are treated equivalently. 读优先级策略

    https://docs.mongodb.com/manual/reference/method/Mongo.setReadPref/#Mongo.setReadPref

    Mongo.setReadPref(mode, tagSet)

    Call the setReadPref() method on a Mongo connection object to control how the client will route all queries to members of the replica set.

    ParameterTypeDescription
    mode string One of the following read preference modes: primaryprimaryPreferred,secondarysecondaryPreferred, or nearest.
    tagSet array Optional. A tag set used to specify custom read preference modes. For details, see Tag Sets.

     

    https://docs.mongodb.com/manual/reference/read-preference/#nearest

    The driver reads from a member whose network latency falls within the acceptable latency window. Reads in the nearest mode do not consider whether a member is a primary or secondary when routing read operations: primaries and secondaries are treated equivalently. The read preference member selectiondocumentation describes the process in detail.

  • 相关阅读:
    Gym
    博客搬家
    UVA
    UVA
    UVA
    UVA
    UVA
    UVA1589——xiangqi
    SDUSToj第十一次作业源代码格式问题
    【成长之路】【python】python基础3
  • 原文地址:https://www.cnblogs.com/rsapaper/p/7878010.html
Copyright © 2011-2022 走看看