Book Image

Apache Cassandra Essentials

By : Nitin Padalia
Book Image

Apache Cassandra Essentials

By: Nitin Padalia

Overview of this book

Apache Cassandra Essentials takes you step-by-step from from the basics of installation to advanced installation options and database design techniques. It gives you all the information you need to effectively design a well distributed and high performance database. You’ll get to know about the steps that are performed by a Cassandra node when you execute a read/write query, which is essential to properly maintain of a Cassandra cluster and to debug any issues. Next, you’ll discover how to integrate a Cassandra driver in your applications and perform read/write operations. Finally, you’ll learn about the various tools provided by Cassandra for serviceability aspects such as logging, metrics, backup, and recovery.
Table of Contents (9 chapters)
8
Index

SimpleStrategy


The SimpleStrategy is a basic replication strategy. It's used when using a single datacenter. This method is rack unaware. It places replicas on subsequent nodes in a clockwise order.

Here is a sample CQL command to create a keyspace with SimpleStrategy and a replication factor of 3, which can be fired from the cqlsh prompt:

cqlsh>  CREATE KEYSPACE cassandrademodb WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 };