necessity of replica sets?

32 views
Skip to first unread message

ad...@cs.miami.edu

unread,
Oct 27, 2016, 10:30:13 PM10/27/16
to mongodb-user
Hi,

New to this group and new to Mongo. 

I see in the Mongo docs that replica sets "provide redundancy and high availability, and are the basis for all production deployments."  It sounds to me like they are suggesting that  one should never run a production mongodb without replication.

To me, this sounds a little overboard.  Many times people run single instance databases without replication with various RDMS.  Is something different with mongo that makes it highly or somewhat unreliable without replication?

Sure the database might run faster with replication (offloading the reads), and if mongo crashes it can pick another primary in semi-realtime.  But should we really expect it to be so unstable that it is never intended to be used without replication?  I rarely run replication on my RDMS: just a good backup strategy,raid10, and a watchdog script that will restart the database if the process crashes... is this not enough for mongo?

Thanks,

-Adam

Wan Bachtiar

unread,
Nov 7, 2016, 12:07:10 AM11/7/16
to mongodb-user

Many times people run single instance databases without replication with various RDMS. Is something different with mongo that makes it highly or somewhat unreliable without replication?

Hi Adam,

For most applications, data is a critical commodity. Storing data in one place is a risky proposition, so you need to have a strategy or a plan in place to ensure that you can recover from a failure as quickly as possible.

Achieving High Availability through replication is not a concept that’s unique to MongoDB, or NoSQL databases. Some RDBMS also supports data replication feature for high availability.

High availability is very valuable in sharded cluster deployment, without it the cluster may be missing a large part of data while servers are in repair.

I rarely run replication on my RDMS: just a good backup strategy,raid10, and a watchdog script that will restart the database if the process crashes… is this not enough for mongo?

MongoDB replication is relatively easy to setup to provide fault tolerance. In your example, there are cases that may need extra care, such as the watchdog script server could have died, or there’s a corruption of the database file after an unclean shutdown that requires manual intervention, etc.

For more information please check out :

New to this group and new to Mongo.

I would recommend to enrol in a free online course at MongoDB University to learn more about MongoDB.

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages