Skip to navigation
How read from nearest replication set with pymongo
18.03.14
from pymongo import ReplicaSetConnection from pymongo import ReadPreference db = ReplicaSetConnection('localhost:27017', replicaSet='rs1')['my_db'] db.read_preference = ReadPreference.NEAREST db.tag_sets = [{'secondaries': 1}]
http://stackoverflow.com/questions/13529174/mongodb-read-preferences
Reply
Anonymous
Information Epoch 1732526879
Data dominates.
Home
Notebook
Contact us