mongodb - Disadvantage of Mongo rs.slaveOk() for master instances -


i using robomongo tool connect various mongo instances. 1 blocker faced robomongo not allow setting readpreference particular connection.
however, saw can specify robomongo load .mongorc.js file @ start up. added line rs.slaveok() , can connect slave instances well.

means readpreference set secondary when connecting master instances. know if there disadvantages of keeping on connections. sure there reason behind robomongo developers not allowing default setting (although setting connection preference each connection have been best solution)

it because of stale read issue mentioned here -

[http://docs.mongodb.org/manual/core/read-preference/#edge-cases-2-primaries]

it requires awareness of replication strategy , 'staleness' of data. link above great read regardless.

edit: answer lacked brief summary mongodb docs linked above ( mentioned user 200-ok) "exercise care when specifying read preferences: modes other primary may return stale data because asynchronous replication, data in secondary may not reflect recent write operations"


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -