Preface
Why Cockroach?
Welcome to CockroachDB: The Definitive Guide, and thank you for being here! With this book, we want to help you learn to build and deploy applications with CockroachDB, the distributed SQL database built for the cloud.
First, the question everyone asks: Why the name CockroachDB?
One immutable fact of engineering is that things break. At large enough scale, things are breaking all the time. The kinds of failures that might happen once a year on a single machine become daily occurrences when you’re running hundreds of shards. A system that aspires to handle large scale must treat fault tolerance as a core responsibility. This was one of the key insights of Google’s MapReduce framework. By requiring all computation to fit within a relatively restrictive framework, it became straightforward for the system to automatically rerun the necessary pieces of work after a failure.
We believe that this is how it should be: highly available replication should be the default state of a database from day one, not the result of painstaking configuration work. And looking ahead to day two (or day two hundred), the database must be able to grow along with the application so that runaway success is a cause for celebration, not panic.
When we set out to build a relational database from scratch, we wanted to bring consistency, native resilience, data locality, and massive scale to modern cloud applications. Our vision was of a system able to colonize any resource that you gave ...