Mongodb副本集读写分离

  





<? php   $ m=新MongoClient (“mongodb://localhost/?杂志=true&w=majority&wTimeoutMS=20000 ");   ?>

cfg=rs.conf ()   cfg.settings={}   cfg.settings.getLastErrorDefaults={w: 3, wtimeout: 6000}   rs.reconfig (cfg)

Mongodb副本集读写分离