Quick Answer
Rolling index build builds an index on each replica set member one at a time (not simultaneously), so the replica set stays operational during the build. Build index on each secondary while it's stepped down, then step down the primary and build on it. Avoids the performance impact of building on all nodes at once. Required approach for building indexes on large collections in production without downtime.
Answer
Rolling index builds rebuild indexes on secondaries first, then switch primaries safely, ensuring zero downtime.
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.