Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Couchbase Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Couchbase Essentials

Couchbase Essentials

By : John C Zablocki
3 (2)
close
close
Couchbase Essentials

Couchbase Essentials

3 (2)
By: John C Zablocki

Overview of this book

This book is for those application developers who want to achieve greater flexibility and scalability from their software. Whether you are familiar with other NoSQL databases or have only used relational systems, this book will provide you with enough background to move you along at your own pace. If you are new to NoSQL document databases, the design discussions and introductory material will give you the information you need to get started with Couchbase.
Table of Contents (10 chapters)
close
close
9
Index

Couchbase SDKs

We'll explore the Couchbase SDK and relevant APIs in detail over the next few chapters. But to complete our discussion on balancing and rebalancing, it's useful to understand the process from client to cluster. When an SDK is initialized in a client application, it makes a persistent connection to the cluster over a RESTful API. This API broadcasts a JSON message containing the cluster's topology. As nodes are added or removed, the cluster sends a new message with an updated topology.

This behavior sets Couchbase apart from other databases, whether relational or nonrelational. Most database systems have a central point of communication that is responsible for client communications. Couchbase owes some of its massive throughput to its smart clients. Eliminating the bottleneck of a man-in-the-middle allows performance levels to reach a massive scale. On a cluster with only four nodes, Couchbase is capable of achieving nearly 1 million operations per second.

Returning to the idea of balancing data across nodes, there's an additional detail that I didn't mention. The cluster maintains an abstraction known as vBuckets, which are used to direct a key to the correct server. Rather than mapping a key directly to a node, Couchbase SDKs map the key to one of the vBuckets. The endpoint for a vBucket is provided to the client as part of its topology message from the cluster. Regardless of the number of nodes, the number of vBuckets remains the same. The keys always hash to the same vBucket, even if the cluster changes the endpoint of the vBucket.

While you'll generally not need to worry about the existence of vBuckets, it is important to understand what happens on the client as the cluster changes its topology. The client maintains a map of vBuckets to the nodes. If that map changes due to a node failure, brief client failures may appear while the map is updated.

Tip

The only case where you're likely to care about vBuckets is if you are developing an application using Mac OS X. On this platform, Couchbase Server uses 64 vBuckets instead of the standard 1024. While this difference generally won't impact your development, it will impede your ability to move data from your local server to another cluster running Linux or Windows.

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY