Featured Blog Texture

Blog

Engineering

cockroachdb-roachfest-announcement-blog-header

Engineering

|Product

|Company

CockroachDB Serverless is generally available and more product updates

When we set out to build a better relational database seven years ago, we envisioned a solution that was scalable, highly available, and always consistent, because as we said then, “we’d rather spend time quickly building and iterating products, not engineering solutions to database shortcomings.” Today, after developing a database that delivers those capabilities and has been battle-tested by thousands of customers, we’re still following the same northstar. But we’ve extended that vision.

Nate Stewart

Nate Stewart

Mar 4, 2024

foreign-key-1

Engineering

3 common foreign key mistakes (and how to avoid them)

Foreign keys are an important element of any relational database. But when you’re setting up your database schema, it’s relatively easy to create problems for yourself if the foreign keys aren’t set up correctly. Here are three of the most common mistakes made with foreign keys, and a little advice on how to avoid them!

charlie

Charlie Custer

June 28, 2023

foreign-key-3

Engineering

Database schema: SQL schema examples and best practices

In the context of a database and how it’s organized, the term database schema describes the structure of the data and how the elements within the database relate to each other. This information is often presented visually with diagrams that illustrate how different tables and elements connect and to give you a logical view of the entire database. However, the schema itself exists in the database as the coded rules that define the data’s structure and relationships.

charlie

Charlie Custer

Apr 13, 2023

kubernetes part2 zoevandijk-1

Engineering

Why CockroachDB runs managed services on Kubernetes

*Note: this post originally ran in 2020, at the very beginning of our managed service/multi-tenant engineering journey. If you want an update on what kind of deployment models CockroachDB offers and what our current capabilities are check out our latest release blog. There’s this really fun game I like to play. You get a bunch of SREs in a room and you see how quickly you can rile them up. Here are some things to say next time you’re in a room of SREs:

Josh Imhoff

Josh Imhoff

Oct 20, 2022

cdc-tuning-feature

Product

Engineering

SQL query tuning with DB Console

Observability is how you understand the current state of your database: how it is behaving, plus any potentially problematic things you should be paying attention to — and identifying improvements based on this information.

Marylia Gutierrez

Marylia Gutierrez

Augt 1, 2022

evolve-business-by-zach-meyers-1

Product

Engineering

Interactive demo of CockroachDB using D3

Cockroaches first evolved more than 300M years ago, and yet the O.G. is still recognizable. "Modern" cockroaches are about 200M years old; that they're still with us, largely unchanged, is quite impressive from an evolutionary perspective.

 Spencer Kimball

Spencer Kimball

May 20, 2022

HighAvailabilityinCockroachDB blog art by ChristinaChung-1

Engineering

SIGMOD 2020: Cockroach Labs publishes research paper on CockroachDB

Over the past few months, a team of our engineers, technical writers, product managers, and sales engineers codified the research and learnings of CockroachDB and are now contributing this knowledge back into the very system from which we have benefited with the hope of further advancing distributed systems research and design. The research paper, "CockroachDB: The Resilient Geo-Distributed SQL Database", is a labor of love that we are honored to have published by SIGMOD, the Association for Computing Machinery's (ACM) Special Interest Group on Management of Data, which specializes in large-scale data management problems.

jessica headshot

Jessica Edwards

June 10, 2020

Choosing-Index-Keys

Engineering

How online primary key changes work in CockroachDB

As of our 20.1 release, CockroachDB supports online primary key changes. This means that it is now possible to change the primary key of a table while performing read and write operations on the table. Online primary key changes make it easier to transition an application from being single-region to multi-region, or to iterate on the schema of an application with no down time. Let’s dive into the technical challenges behind this feature, and our approach to solving them. As part of the deep dive, let’s review how data is stored in CockroachDB, and how online schema changes work in CockroachDB.

Rohan Yadav

May 21, 2020

Availability 4

Engineering

Availability and region failure: Joint consensus in CockroachDB

At Cockroach Labs, we write quite a bit about consensus algorithms. They are a critical component of CockroachDB and we rely on them in the lower layers of our transactional, scalable, distributed key-value store. In fact, large clusters can contain tens of thousands of consensus groups because in CockroachDB, every Range (similar to a shard) is an independent consensus group. Under the hood, we run a large number of instances of Raft (a consensus algorithm), which has come with interesting engineering challenges. This post dives into one that we’ve tackled recently: adding support for atomic replication changes (“Joint Quorums”) to etcd/raft and using them in CockroachDB to improve resilience against region failures.

Tobias Grieger

Nov 26, 2019

Automated-Rebalance-by-Rebekka-Dunlap-1

Engineering

Distributed SQL (NewSQL) made easy: How CockroachDB automates operations

A modern distributed database should do more than just split data amongst a number of servers; it should correctly manage partitions (or shards). Moreso, it should automatically detect failures, fix itself without any operator intervention, and completely abstract this management from the end user. This post is the first in a series on how CockroachDB handles its data and discusses the mechanisms it uses to rebalance and repair. These systems make managing a CockroachDB cluster significantly easier than managing other databases.

Bram Grunei

Oct 5, 2017