Book Image

Learning Cassandra for Administrators

By : Vijay Parthasarathy
Book Image

Learning Cassandra for Administrators

By: Vijay Parthasarathy

Overview of this book

<p>Apache Cassandra is a massively scalable open source NoSQL database. Cassandra is perfect for managing large amounts of structured, semi-structured, and unstructured data across multiple data centers and the cloud. Cassandra delivers linear scalability and performance across many commodity servers with no single point of failure.<br /><br />This book starts by explaining how to derive the solution, basic concepts, and CAP theorem. You will learn how to install and configure a Cassandra cluster as well as tune the cluster for performance. After reading the book, you should be able to understand why the system works in a particular way, and you will also be able to find patterns (and/or use cases) and anti-patterns which would potentially cause performance degradation. Furthermore, the book explains how to configure Hadoop, vnodes, multi-DC clusters, enabling trace, enabling various security features, and querying data from Cassandra.<br /><br />Starting with explaining about the trade-offs, we gradually learn about setting up and configuring high performance clusters. This book will help the administrators understand the system better by understanding various components in Cassandra’s architecture and hence be more productive in operating the cluster. This book talks about the use cases and problems, anti-patterns, and potential practical solutions as opposed to raw techniques. You will learn about kernel and JVM tuning parameters that can be adjusted to get the maximum use out of system resources.<br /><br /><br /></p>
Table of Contents (14 chapters)

Preface

The Apache Cassandra database is the right choice when you need scalability in terms of millions to billions of rows with the highest availability, such as 99.99 percent availability of characteristics, without compromising on performance. Cassandra's support for replicating across multiple datacenters is the best in the industry.

Cassandra for DevOps provides comprehensive information on the architecture, installation, monitoring, performance tuning, and configuring Apache Cassandra. You will learn how to address performance and scalability problems and about the tools that can be used for day-to-day administration tasks. Managing a huge amount of data requires a lot of optimization in choosing what to monitor and other management tasks. The simplest administrative tasks can take up a lot of your time; understanding how Cassandra works is the key to spending your time and energy on the right things and making sure you monitor the cluster properly.

What this book covers

Chapter 1, Basic Concepts and Architecture, starts by explaining the history and challenges of Big Data and the reason for Cassandra's existence. This chapter explains a bit about the CAP theorem and BigTable concepts.

Chapter 2, Installing Cassandra, talks about the hardware choices based on your traffic patterns and YAML configurations. It also talks about EC2 hardware choices as well as and keyspace and column family configurations, including the various options available.

Chapter 3, Inserting and Manipulating Data, explains about data modeling. It also talks about creating, altering, and querying data and tracing the query in a column family.

Chapter 4, Administration and Large Deployments, talks about basic administrative tasks, the tools to make data consistent (HH and Repairs), events that can hurt performance, and the ways to reduce the impact.

Chapter 5, Performance Tuning, talks a little bit about things to look out for and tuning for better performance, because the hardest part of running a Java app is getting the right GC settings and dealing with GC pauses. It also talks about request tracing to look for bottlenecks as well as tools to monitor Cassandra.

Chapter 6, Analytics, talks about Hadoop integration and segregating traffic for different work loads.

Chapter 7, Security and Troubleshooting, talks about the various security methods that can be implemented to secure the data in flight and at rest.

Bonus Chapter, Evolving Apps and Use Cases, talks about the various evolving apps and use cases and their tradeoffs. This chapter tries to provide you with information so that you can understand the pitfalls. This chapter can be found online at https://www.packtpub.com/sites/default/files/downloads/bonus_chapter.pdf.

What you need for this book

  • Sun JVM 1.6 or above

  • A Debian or Linux machine

  • Basic Internet access

  • Enough disk and memory to run Cassandra

Who this book is for

This book is for Cassandra administrators and DevOps responsible for automating and monitoring Cassandra.

Performance engineers and developers who would like to understand the administration of Cassandra will also benefit from this book.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The Cassandra.yaml file is well documented and is self-explanatory."

A block of code is set as follows:

- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "<IP ADD OF SEED>,<IP ADD OF SEED>"

Any command-line input or output is written as follows:

Device: rrqm/s wrqm/s   r/s    w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
dm-0      0.00   0.00  0.00   3.17  0.00  0.02    10.11     0.01  2.11  2.11  0.67

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "If the threads try to create any object larger than the space available for the generations allocated, it will be created directly in Old Generation."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.