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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -