blog-banner

What is CRDB?

Last edited on December 27, 2023

0 minute read

    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 benefitsCopy Icon

    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?Copy Icon

    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?Copy Icon

    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.”

    high availability
    architecture
    multi-active availability
    resilience
    multi-cloud
    multi-region