Book Image

Learning Apache Cassandra - Second Edition

Book Image

Learning Apache Cassandra - Second Edition

Overview of this book

Cassandra is a distributed database that stands out thanks to its robust feature set and intuitive interface, while providing high availability and scalability of a distributed data store. This book will introduce you to the rich feature set offered by Cassandra, and empower you to create and manage a highly scalable, performant and fault-tolerant database layer. The book starts by explaining the new features implemented in Cassandra 3.x and get you set up with Cassandra. Then you’ll walk through data modeling in Cassandra and the rich feature set available to design a flexible schema. Next you’ll learn to create tables with composite partition keys, collections and user-defined types and get to know different methods to avoid denormalization of data. You will then proceed to create user-defined functions and aggregates in Cassandra. Then, you will set up a multi node cluster and see how the dynamics of Cassandra change with it. Finally, you will implement some application-level optimizations using a Java client. By the end of this book, you'll be fully equipped to build powerful, scalable Cassandra database layers for your applications.
Table of Contents (14 chapters)

Summary


In this chapter, we confronted and explored the major issues that stem from Cassandra's masterless, distributed, and replicated architecture. Interacting with Cassandra often feels indistinguishable from working with a single-node data store, but when working with any distributed database, we need to think about the trade-off between consistency and availability. In some situations, we might be willing to read slightly out-of-date data for the sake of performance and failure tolerance; in others, we will tolerate a higher probability of a request failing in order to ensure that the data we're reading is fully up-to-date.

You learned that the partition key for a row determines not only its physical location in storage but also which nodes within the cluster store copies of the row. This further motivates the practice of designing our table schemas such that most queries are looking for data grouped under a single partition key.

You discovered how in a distributed database, deletion...