Redirecting all queries to secondary in sharded cluster in mongodb -
how redirect queries secondary in sharded cluster rather setting readpreference variable while making connection mongo router. in short, mongo router redirect read queries secondary primary default.
you readpreference connection string option, or query option (if driver supports this). connection mongos router readpreference set gets honoured, when selecting member of each shard's replicaset gets queried, if there no mongos router in way.
Comments
Post a Comment