Book Image

Couchbase Essentials

Book Image

Couchbase Essentials

Overview of this book

Table of Contents (15 chapters)
Couchbase Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Durability operations


In Chapter 1, Getting Comfortable with Couchbase, you learned that Couchbase Server handles reads and writes by writing to the memory first, and then writing asynchronously to the disk. The standard CRUD operations we've seen so far make no distinction between a key being written to the cluster memory and a key persisting in the disk.

If you've set up replication, you've likely guarded your data against potential data loss from a single server failing before flushing the key to the disk. However, there will be times when your business process cannot tolerate the possibility that a record did not persist. If you have such a requirement, Couchbase Server supports inclusion of durability requirements with your store requests.

These durability requirements are tunable to your specific needs. For example, you might wish to know whether a key was written to the disk on its master node and replicated to at least two nodes in the memory. To use a durability check with a .NET...