High AvailabilityReplica Sets & Read Preferences
All courses

Survive node failures gracefully

A replica set has one primary (writes) and secondaries (replicate oplog). Automatic failover elects a new primary.

Read preferences: primary (default), secondaryPreferred, etc. Stale reads are a feature you opt into.

Output
Press Run to execute your code.