Helion


Szczegóły ebooka

Getting Started with CockroachDB

Getting Started with CockroachDB


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.

  • Getting Started with CockroachDB
  • Contributors
  • About the author
  • About the reviewers
  • Preface
    • Who this book is for
    • What this book covers
    • To get the most out of this book
      • Download the example code files
    • Download the color images
    • Conventions used
    • Get in touch
    • Share Your Thoughts
  • Section 1: Getting to Know CockroachDB
  • Chapter 1: CockroachDB A Brief Introduction
    • The history and evolution of databases
      • SQL
      • Object-oriented databases
      • NoSQL
      • NewSQL
    • Database concepts
      • Cardinality
      • Overview of database models
      • Processing models
      • Embedded and mobile databases
      • Database storage engines
    • CAP theorem
      • Consistency and partition tolerance (CP)
      • Availability and partition tolerance (AP)
      • Consistency and availability (CA)
    • CockroachDB
      • Why yet another database?
      • Inspiration
      • Key terms and concepts
      • High-level overview
    • Summary
  • Chapter 2: How Does CockroachDB Work Internally?
    • Technical requirements
    • Installing a single-node CockroachDB cluster using Docker
    • Execution of a SQL query
      • SQL query execution
      • Parsing
      • Logical planning
      • Physical planning
      • Query execution
    • Managing a transactional key-value store
    • Data distribution across multiple nodes
      • The MSKVS
      • Meta ranges
      • Table data
    • Data replication for resilience and availability
      • What is consensus?
      • The Raft distributed consensus protocol
    • Interactions with the disk for data storage
      • Storage engine
    • Summary
  • Section 2: Exploring the Important Features of CockroachDB
  • Chapter 3: Atomicity, Consistency, Isolation, and Durability (ACID)
    • An overview of ACID properties
      • Atomicity
      • Consistency
      • Isolation
      • Durability
    • ACID from CockroachDBs perspective
      • Atomicity
      • Consistency
      • Isolation
      • Durability
    • Summary
  • Chapter 4: Geo-Partitioning
    • Technical requirements
    • Introduction to geo-partitioning
    • Cloud, regions, and zones
      • Region
      • Zone
      • Regions and zones on various cloud providers
    • Geo-partitioning in CockroachDB
      • Single region
      • Multi-region
    • Summary
  • Chapter 5: Fault Tolerance and Auto-Rebalancing
    • Technical requirements
    • Achieving fault tolerance
      • Achieving fault tolerance at the storage layer
      • Working example of fault tolerance at play
    • Automatic rebalancing
    • Recovering from multi-node failures
    • Summary
  • Chapter 6: How Indexes Work in CockroachDB
    • Technical requirements
    • Introduction to indexes
    • Different types of indexes
      • Primary indexes
      • Secondary indexes
      • Hash-sharded indexes
      • Duplicate indexes
      • Inverted indexes
      • Partial indexes
      • Spatial indexes
      • Table joins and indexes
    • Best practices while using indexes
    • Summary
  • Section 3: Working with CockroachDB
  • Chapter 7: Schema Creation and Management
    • Technical requirements
    • DDL
      • CREATE
      • ALTER
      • DROP
    • DML
    • DQL
    • Supported data types
    • Column-level constraints
    • Table joins
    • Using sequences
    • Managing schema changes
    • Summary
  • Chapter 8: Exploring the Admin User Interface
    • Technical requirements
    • Introducing the admin UI
    • Cluster overview
    • Metrics deep dive
    • Database and table definitions
    • Understanding sessions
    • Transactions
    • Tracking jobs
    • Summary
  • Chapter 9: An Overview Of Security Aspects
    • Technical requirements
    • Introduction to security concepts
    • Client and node authentication
      • Generating certificates and keys
      • Client authentication
      • Node authentication
    • Authorization mechanisms
      • Roles
      • Privileges
    • Data encryption at rest and in flight
      • Encryption at rest
      • Encryption in flight
    • Audit logging
    • RTO and RPO
    • Keeping the network secure
    • Security best practices
    • Summary
  • Chapter 10: Troubleshooting Issues
    • Technical requirements
    • Collecting debug logs
      • Log files
      • Log levels
      • Log channels
      • Emitting logs to an external sink
      • Gathering Cockroach debug logs
    • Connection issues
    • Tracking slow queries
    • Capacity planning
    • Configuration issues
    • Guidelines to avoid issues during an upgrade
    • Network latency
    • Advanced debugging options
    • Summary
  • Chapter 11: Performance Benchmarking and Migration
    • Technical requirements
    • Performance Things to consider
      • Infrastructure
      • Popular benchmark suites
      • Benchmarking your specific use cases
    • Performance benchmarking for CockroachDB
    • Migration Things to consider
    • Migrating from traditional databases
      • Migrating from PostgreSQL to CockroachDB
    • Summary
  • Appendix: Bibliography and Additional Resources
    • Why subscribe?
  • Other Books You May Enjoy
    • Packt is searching for authors like you
    • Share Your Thoughts

  • Tytuły: Getting Started with CockroachDB
  • Autor: Kishen Das Kondabagilu Rajanna
  • Tytuł oryginału: Getting Started with CockroachDB
  • ISBN Ebooka: 9781800567757, 9781800567757
  • Data wydania: 2022-03-11
  • Identyfikator pozycji: e_2t2y
  • Kategorie:
  • Wydawca: Packt Publishing