Quick Answer
Read preference controls which replica set member handles read operations. primary: all reads from primary (consistent, default). primaryPreferred: primary if available, else secondary. secondary: always read from secondaries (may be slightly stale). secondaryPreferred: secondaries when available. nearest: lowest network latency. Use secondaries to distribute read load but accept eventual consistency.
Answer
Read preference decides which nodes serve read requests, such as primary, secondary, or nearest, enabling load balancing.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.
MongoDB interview questions and answers for beginner, junior, mid-level, senior, and expert developers. Perfect for freshers and experienced candidates.