Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Couchbase

You're reading from  Learning Couchbase

Product type Book
Published in Nov 2015
Publisher
ISBN-13 9781785288593
Pages 248 pages
Edition 1st Edition
Languages
Author (1):
Henry Potsangbam Henry Potsangbam
Profile icon Henry Potsangbam

Table of Contents (12) Chapters

Introduction to Couchbase The Couchbase Administration Interface Storing Documents in Couchbase Using Buckets Designing a Document for Couchbase Introducing Client SDK Retrieving Documents without Keys Using Views Understanding SQL-Like Queries – N1QL Full Text Search Using ElasticSearch Data Replication and Compaction Administration, Tuning, and Monitoring Case Study – An E-Commerce Application Index

Understanding write operation in the Couchbase cluster


Let's see how the write operation works in the Couchbase cluster. When a write command is issued using the set operation in the Couchbase cluster, the server immediately responds once the document is written to the memory of that particular node. How do clients know which nodes in the cluster will be responsible for storing the document? You might recall that every operation requires a document ID, using this document ID, the hash algorithm determines the vBucket in which it belongs. Then, this vBucket is used to determine the node that will store the document. All mapping information, vBucket to node, is stored in each of the Couchbase client SDKs, which form the cluster map. The Couchbase client library polls cluster to update the cluster map information all the time.

After the node has responded to the write operation, the Couchbase node puts a copy of the document in the disk queue to flush the document to the disk for durability...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}