What is CRDB?

What is CRDB?
[ Guides ]

The Engineer's Survival Guide

Godzilla is headed straight for your datacenter? Have we got a survival guide for you! Consult this handbook of humorous yet helpful expert tips for surviving your job, your workplace, and attack by legendary monsters.

Live, laugh, download free ->

CRDB is shorthand for CockroachDB: the scalable, consistently-replicated, distributed SQL database. And what, exactly, do we mean by “inherently scalable”? Well, a single instance of CRDB can scale from a one laptop to thousands of servers distributed all around the world. Global data, one logical database. 

CockroachDB was built to be an always-on, distributed relational database able to accept reads and writes on all nodes without generating conflicts. Since distributed applications are inherently complex, CRDB is also designed to make life easier for the humans who build and deploy them. This means being low touch and highly automated for operators while remaining easy to reason about for developers.

CRDB benefits

On the outside, CockroachDB abstracts and automates many of the challenges and complexities that come with distributed transactions architecture. It supports familiar tools for working with relational data (i.e., SQL) and Postgres wire compatibility. On the inside, CRDB processes SQL queries over distributed data by converting clients' SQL statements into key-value (KV) data, which is distributed among nodes and written to disk.

This architecture confers powerful benefits that are literally built into the database:

  • Automated replication and partitioning. Data is automatically replicated across nodes to ensure resilience against failures. Additionally, data can be geographically partitioned for compliance and performance benefits.
  • High Availability: CRDB’s distributed design and automatic replication mean that even if a node or a data center fails, the database remains available and operational.
  • Resilience: It’s designed to survive disk, machine, rack, and even data center failures without losing data and with minimal impact on operations.
  • Horizontal scalability:  You can scale CRDB horizontally simply by adding more nodes. (Seriously, that’s it. You’re done. You scaled). 
  • Strong consistency, even on massively scaled deployments: Despite being a distributed system, CockroachDB ensures strong consistency, meaning all nodes have an up-to-date and accurate view of the data.
  • Platform agnostic and multi-cloud. CRDB can be deployed as a single, logical database across multiple regions and even across multiple cloud providers. CRDB runs on AWS, GCP and Azure.
  • Data locality. User data can be pinned to a specific geographic region at the table or even row level using CRDB’s built-in regional-by-row feature, to optimize latency and satisfy data privacy regulations such as GDPR.  
  • Cloud-native compatibility. From the start, CockroachDB was designed to run in the cloud, making it well-suited for containerized environments like Kubernetes. Since traditional relational databases were built for single-server environments, they require additional tooling to run in the cloud. 

For a deeper understanding of how all this works, visit https://www.cockroachlabs.com/docs/stable/architecture/overview

How is CRDB deployed?

The same database is available three different ways:

CRDB serverless. Your own fully-managed, autonomous multi-tenant CockroachDB cluster. Great for starter projects and evaluation because you can start for free — and pay only for what you use.

CRDB dedicated. CockroachDB-as-a-Service, with fully-managed, reserved CockroachDB clusters. The ideal deployment for teams who want to let the database take care of the operational work, so they can do the important work.

CRDB self-hosted. Self-managed CockroachDB clusters give you direct control, with the ability to run anywhere (and everywhere). Public cloud, private cloud, bare metal, hybrid, CRDB is there. 

Why is CRDB named after an insect?

The founders of Cockroach Labs chose the name “CockroachDB” for a very specific and symbolic reason: the incredible resilience and survival abilities of these insects. Just as cockroaches are renowned for their ability to live just about everywhere on Earth, withstand harsh conditions and not only survive but multiply in challenging environments, CockroachDB was designed to offer exceptional database reliability and survivability across the entire planet. 

The name is a metaphor for CRDB’s goal to be the database that is almost impossible to bring down, maintaining data integrity and availability in the most challenging circumstances. The chief platform architect at Bose once described it perfectly:  “We have literally been unable to kill this thing. No matter what we’ve thrown at it.”

About the author

Michelle Gienow github link linkedin link

Michelle Gienow is a recovering journalist turned front end developer based in Baltimore, MD. She creates content around her central obsessions: Jamstack, distributed architecture and developing a cloud native mindset.

Keep Reading

Migrating PostgreSQL to CockroachDB For Multicloud

You need to send cash from your bank to a friend, who happens to use another bank. The money should take a fairly …

Read more
Santander: Hacking human error to achieve operational resilience

If there is one inevitable truth in technology, it is that disasters happen. Calamities like fires, climate …

Read more
Accidentally multi-cloud: Mergers, acquisitions, and deployments

This story was originally published in ITPro Today: Merger Maneuvers in the Multi-Cloud.

Software mergers and …

Read more