Book Image

Getting Started with CockroachDB

By : Kishen Das Kondabagilu Rajanna
Book Image

Getting Started with CockroachDB

By: Kishen Das Kondabagilu Rajanna

Overview of this book

Getting Started with CockroachDB will introduce you to the inner workings of CockroachDB and help you to understand how it provides faster access to distributed data through a SQL interface. The book will also uncover how you can use the database to provide solutions where the data is highly available. Starting with CockroachDB's installation, setup, and configuration, this SQL book will familiarize you with the database architecture and database design principles. You'll then discover several options that CockroachDB provides to store multiple copies of your data to ensure fast data access. The book covers the internals of CockroachDB, how to deploy and manage it on the cloud, performance tuning to get the best out of CockroachDB, and how to scale data across continents and serve it locally. In addition to this, you'll get to grips with fault tolerance and auto-rebalancing, how indexes work, and the CockroachDB Admin UI. The book will guide you in building scalable cloud services on top of CockroachDB, covering administrative and security aspects and tips for troubleshooting, performance enhancements, and a brief guideline on migrating from traditional databases. By the end of this book, you'll have gained sufficient knowledge to manage your data on CockroachDB and interact with it from your application layer.
Table of Contents (17 chapters)
1
Section 1: Getting to Know CockroachDB
4
Section 2: Exploring the Important Features of CockroachDB
9
Section 3: Working with CockroachDB
Appendix: Bibliography and Additional Resources

What this book covers

Chapter 1, CockroachDB – A Brief Introduction, talks about databases and how they have evolved over time. You will also get to know about the high-level architecture of CockroachDB.

Chapter 2, How Does CockroachDB Work Internally?, explores various layers of CockroachDB and some of its inner workings.

Chapter 3, Atomicity, Consistency, Isolation, and Durability (ACID), introduces you to ACID properties and how they are implemented in CockroachDB.

Chapter 4, Geo-Partitioning, explains the concept of geo-partitioning, why we need it, and what are the various options for geographically distributing the data using CockroachDB

Chapter 5, Fault Tolerance and Auto-Rebalancing, explores the concept of fault tolerance and auto-recovery strategies. It also covers a few experiments to understand these concepts better.

Chapter 6, How Indexes Work in CockroachDB, is all about database indexes, how they are useful in improving query performance, the different types of indexes that are supported in CockroachDB, and some of the best practices that you can follow while using indexes.

Chapter 7, Schema Creation and Management, introduces you to SQL syntaxes for DDL, DML, and DQL with examples, different data types available in CockroachDB, sequences, and how to manage schema changes.

Chapter 8, Exploring the Admin User Interface, explores the admin user interface that comes by default when you deploy a CockroachDB cluster. We examine all the metrics and other information that are available in the user interface and how they are useful in troubleshooting issues.

Chapter 9, An Overview of Security Aspects, touches upon the key security aspects that you have to pay attention to when using CockroachDB. We also learn about authentication, authorization, how to protect data with encryption while at rest and in flight, and how to achieve desired data protection by defining the correct strategies for RTO and RPO. Network security and some security best practices are also covered.

Chapter 10, Troubleshooting Issues, helps you in getting yourself familiarized with troubleshooting issues by collecting logs, looking at some of the metrics, understanding and tracking slow queries, and integrating logs with external sinks. This chapter also covers advanced debugging options at the end.

Chapter 11, Performance Benchmarking and Migration, discusses performance, what the key indicators of performance are, and how to measure them. You will also learn about migrating from other traditional databases to CockroachDB.

Appendix: Bibliography and Additional Resources, provides additional resource material that you can go through to become more familiar with CockroachDB.