Question

Can some one explain Single Server Durability in detail? I came across it while I was going through MongoDB concepts.

Was it helpful?

Solution

Full single server durability is part of the ACID paradigm, more specifically; durability ( http://en.wikipedia.org/wiki/ACID#Durability ).

It requires that if a server goes down, in a single server environment, that it will not lose its data or become corrupt.

MongoDB only partly abides by the ACID rule of durability due to the nature of delayed writes to both the journal and disk. Even though this window is small (like 60 ms) there is still a small possibility of losing a couple of operations in a single server environment unless you were to use journal acknowledged writes in your application.

In the event of a failure with journal acknowledged writes on you would be able to replay the journal to ensure that the only operations to lose would be the ones that were incapable of reaching the server before it failed.

In the event of a failure without journal acknowledged writes there would be the possibility of losing all operations within a 60 ms window, you mjust decide if that means anything to you; on a single server environment your site is probably too small to care tbh.

OTHER TIPS

It means that a solo server (not a part of replica set) offers at least some guarantees to persist your data in a durable fashion. Before this feature was introduced, you had to use replica sets to make sure that if a server goes down, it doesn't lose your data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top