Chapter 2: How Does CockroachDB Work Internally?
In the previous chapter, we learned about the evolution of databases and the high-level architecture of CockroachDB. In this chapter, we will go a bit deeper into each of the layers of CockroachDB and explore how CockroachDB works internally. We will also discuss some of the core design aspects that form the basic pillars of CockroachDB.
CockroachDB can be broadly divided into five main layers, as outlined here:
- Structured Query Language (SQL)
- Transactional
- Distribution
- Replication
- Storage
Each of these layers will be explained as the main topics of this chapter, in the following order:
- Installing a single-node CockroachDB cluster using Docker
- Execution of a SQL query
- Managing a transactional key-value store
- Data distribution across multiple nodes
- Data replication for resilience and availability
- Interactions with the disk for data storage
Since we will be trying...