pymongo has master_slave connection implemented. But it won't work
with replica set automatically, developers have to write their own
codes to detect a master from connection module. The only way pymongo
support to connect to replica set is to use connection, writes and
reads all goes to master
the way I thought is to make a master_slave connection instance over
the existed connection instance and get enough info from it
It seems php driver already supported this feature in its description
- is duplicated by
-
PYTHON-270 Simplify MasterSlaveConnection configuration
- Closed