mongodb single server

2 views
Skip to first unread message

Samuel Carlier

unread,
Sep 7, 2010, 11:42:21 AM9/7/10
to mongodb-user
Hi,

i have a question about durability with a single server.
i have only 1 server to put mongodb on. what i read in this group is
that a min of 2 servers is recommend.

the question is what kind of dataloss is there with a server crash /
unclean termination
mongodb does flush data to disk every minute right? so when there is a
crash we have a chance to loss 1min of data?.

Michael Dirolf

unread,
Sep 7, 2010, 11:48:06 AM9/7/10
to mongod...@googlegroups.com
You could lose more than that. Single-server durability is coming in
1.8, but until then you probably shouldn't be running w/ just a single
node in production.

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Andreas Jung

unread,
Sep 7, 2010, 11:48:40 AM9/7/10
to mongod...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


http://blog.mongodb.org/post/381927266/what-about-durability

If you need shorter fsync intervals -> adjust it (some commandline
parameter - check the commandline docs).

- -aj

- --
ZOPYX Limited | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope & Plone
D-72070 T�bingen | Produce & Publish
www.zopyx.com | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMhl7YAAoJEADcfz7u4AZjHMQLvRp2bTuNxfiEB4C3R2nJ7pfc
nKtxEIi4hxbSEhMzXGYk2MP7WvPHZiG1pZnZP4UxkzGComa4309pxHz+b2pbsW/v
GnhUN5/pq184WKSpbYjjRdQSuQ9bFWO6KwEFxR0FShC06wmM59Pr09u4yZoTxUi6
sEN0gRPwQhFt4i0kIFtt5YqrTMnw33zRZuxOmVir313A6BjHMEMxvoMF4k4kEmov
usfkjMPLtbYkyj+PDkpCOqEnSsV9MY8AO5mUG6f99y2YP4IwXyzDYmuQ3k/BZ1hR
uxn84GY2wtVTfMrJFvnrICxHYSw9YDAaWVnfMBhV328N3Eb9Ij6fz07RRhsnCCW4
Tn224MeRUiOhLYpxOOK1vpiJt4KpI2Dut1AjCkc5j65FmmreMV3ZDNW9+WCUjUZ+
EGUdrzYHwrJO0RrAlIRjcOUAdEqwweUFJ+Bfc5HsMLUwnVuVz8PdFfGIE3BTscfG
TDFXM0p8K9ZcVg4RrnN/rUbzaKtiQxU=
=R04c
-----END PGP SIGNATURE-----

lists.vcf

Markus Gattol

unread,
Sep 7, 2010, 4:46:31 PM9/7/10
to mongod...@googlegroups.com
yup, I am not sure but I think Mike was indicating that you could not
only loose data but much worse, your data set might become inconsistent.

When you are talking about at least two nodes, you are talking about a
master/slave setup. However, this has now been superseded by replica
sets where a minimum of three shared-nothing nodes (one primary and two
secondaries) is recommended (this has to do with automatic
failover/recovery and the voting procedure involved).

Michael Dirolf

unread,
Sep 7, 2010, 4:52:36 PM9/7/10
to mongod...@googlegroups.com
On Tue, Sep 7, 2010 at 16:46, Markus Gattol <markus...@sunoano.org> wrote:
> yup, I am not sure but I think Mike was indicating that you could not
> only loose data but much worse, your data set might become inconsistent.

I was indicating that you can lose more than a second of data.

> When you are talking about at least two nodes, you are talking about a
> master/slave setup. However, this has now been superseded by replica
> sets where a minimum of three shared-nothing nodes (one primary and two
> secondaries) is recommended (this has to do with automatic
> failover/recovery and the voting procedure involved).

You can deploy replica sets with only 2 physical nodes, the minimum is not 3.

Markus Gattol

unread,
Sep 8, 2010, 6:39:02 AM9/8/10
to mongod...@googlegroups.com

>> yup, I am not sure but I think Mike was indicating that you could
>> not only loose data but much worse, your data set might become
>> inconsistent.

Michael> I was indicating that you can lose more than a second of data.

one second? You mean one minute no? (flush to disk happens every 60
seconds per default)


>> When you are talking about at least two nodes, you are talking
>> about a master/slave setup. However, this has now been superseded
>> by replica sets where a minimum of three shared-nothing nodes (one
>> primary and two secondaries) is recommended (this has to do with
>> automatic failover/recovery and the voting procedure involved).

Michael> You can deploy replica sets with only 2 physical nodes, the
Michael> minimum is not 3.

Sure. I said 3 is "recommended" otherwise an arbiter should be set up
http://www.markus-gattol.name/ws/mongodb.html#do_i_need_an_arbiter

Reply all
Reply to author
Forward
0 new messages