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 Cassandra 3.x High Availability
  • Table Of Contents Toc
  • Feedback & Rating feedback
Cassandra 3.x High Availability

Cassandra 3.x High Availability

By : Strickland
3.8 (6)
close
close
Cassandra 3.x High Availability

Cassandra 3.x High Availability

3.8 (6)
By: Strickland

Overview of this book

Apache Cassandra is a massively scalable, peer-to-peer database designed for 100 percent uptime, with deployments in the tens of thousands of nodes, all supporting petabytes of data. This book offers a practical insight into building highly available, real-world applications using Apache Cassandra. The book starts with the fundamentals, helping you to understand how Apache Cassandra’s architecture allows it to achieve 100 percent uptime when other systems struggle to do so. You’ll get an excellent understanding of data distribution, replication, and Cassandra’s highly tunable consistency model. Then we take an in-depth look at Cassandra's robust support for multiple data centers, and you’ll see how to scale out a cluster. Next, the book explores the domain of application design, with chapters discussing the native driver and data modeling. Lastly, you’ll find out how to steer clear of common anti-patterns and take advantage of Cassandra’s ability to fail gracefully.
Table of Contents (10 chapters)
close
close

Understanding queries


In order to make sense of the various types of queries, we will start with a common data model to be used across the following examples. For this data model, we will return to the authors table, with name as the partition key, followed by year and title as clustering columns. We'll also sort the year in descending order. This table can be created as follows:

CREATE TABLE authors ( 
   name text, 
   year int, 
   title text, 
   isbn text, 
   publisher text, 
   PRIMARY KEY (name, year, title) 
) WITH CLUSTERING ORDER BY (year DESC); 

Also, for the purposes of these examples, we will assume a replication factor of 3 and consistency level of QUORUM.

Query by key

We'll start with a basic query by key:

SELECT * FROM authors WHERE name = 'Tom Clancy'; 

For this simple select, the query makes the request to the coordinator node, which in this case owns a replica for our key. The coordinator then retrieves the row from another replica...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

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