ADVERTISEMENT
Google AdSense Slot (headerLeaderboard)

Set your Publisher ID in src/config/ads.ts to display live ads.

MongoDB NoSQL Database Tutorial• 6 min read

Replica Sets & Horizontal Sharding

Achieve 99.999% high availability with 3-node Replica Sets, automatic election failover, and horizontal cluster sharding.

Primary-Secondary Replication

A standard MongoDB replica set contains 1 Primary node (accepts writes) and 2 Secondary nodes (replicate via the oplog). If the primary fails, secondaries hold an automatic election within seconds.

ADVERTISEMENT
Google AdSense Slot (inContentBanner)

Set your Publisher ID in src/config/ads.ts to display live ads.

Test Yourself With Exercise

+15 XP

In a MongoDB replica set, which node is responsible for receiving write operations from the application by default?