node.js - "Secondary" vs "Slave" in Mongodb -



node.js - "Secondary" vs "Slave" in Mongodb -

i trying clarify terminology difference, if any, between "secondary" , "slave" in mongodb.

confusion stems connecting w/ node-mongodb-native documentation of db constructor:

db_opts = {db: { readpreference: readpreference.secondary slaveok: true }} mongoclient.connect('mongodb://example', db_opts, ...)

what difference between readpreference alternative , slaveok alternative there?

don't caught on secondary vs. slave here. you're asking slaveok vs readpreference.

slaveok deprecated in favor of using readpreference. mongoclient docs explicitly state slaveok: "legacy alternative allowing reads secondary, utilize readprefrence instead". state setting readpreference overrides slaveok value.

node.js mongodb

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -