Introduction
A replica set in MongoDB helps keep your data safe and available by making copies of your data on multiple servers.
You want your database to keep working even if one server stops.
You need to protect your data from being lost.
You want to spread read requests to different servers to make things faster.
You want automatic failover so your app keeps running without manual fixes.