Featured Blog Texture

Blog

Engineering

RAFT 2

Engineering

Raft is so fetch: The Raft Consensus Algorithm explained through "Mean Girls"

Raft is a consensus algorithm used in distributed systems to ensure that data is replicated safely and consistently. That sentence alone can be confusing. Hopefully the analogy in this post can help people understand how it works. In honor of national Mean Girls day (“on October 3rd he asked me what day it was”), I present the Raft Consensus Algorithm as explained through the movie Mean Girls. (For a great, more technical overview of Raft, we recommend The Secret Lives of Data).

Mikael Austin

Mar 13, 2024

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 Gruneir

Oct 5, 2017

Mesosphere-intergration-by-Ana-Hill-1

Engineering

CockroachDB on DC/OS: Resilient and hassle-free operations for global services

CockroachDB makes data easier to manage by providing a strongly-consistent, highly-scalable, SQL interface that you can trust to be there when you need it. We’ve designed it to be a truly cloud-native, distributed SQL database that’s easy to operate in any environment you throw at it. One such computing environment that has grown in popularity over the previous few years is Mesosphere’s DC/OS, a datacenter operating system built on top of Apache Mesos. DC/OS is an orchestration system for deploying and managing distributed applications across a cluster of machines as if they were a single pool of resources. DC/OS has both an open source and an enterprise version that gives you the ability to elastically scale your infrastructure on prem or in the cloud. It provides scheduling, resource allocation, service discovery, automatic recovery from failure, load balancing, and more, all with the goal of making it easier to manage your applications.

alex profile

Alex Robinson

Sept 28, 2017

acidrain-1

Engineering

Real transactions are serializable

Most databases offer a choice of several transaction isolation levels, offering a tradeoff between correctness and performance. However, that performance comes at a price, as developers must study their transactional interactions carefully or risk introducing subtle bugs. CockroachDB provides strong (“SERIALIZABLE”) isolation by default to ensure that your application always sees the data it expects. In this post I'll explain what this means and how insufficient isolation impacts real-world applications.

Ben Darnell

Ben Darnell

Sept 21, 2017

sqllite sql grammar diagram-e1457554225628

Engineering

Efficient documentation using SQL grammar diagrams

As CockroachDB approaches beta, user documentation has become increasingly important, and one of the meatiest requirements is documentation of our SQL implementation. For inspiration, I researched how other databases have documented SQL. The most effective example I found was SQLite’s grammar diagrams.

Matt Jibson

Mar 16, 2016

2020-cloud-report-header-bg

Engineering

Could CockroachDB ever replace Redis? An experiment

The goal of CockroachDB is to “make data easy,” and while it seems like a stretch now, we eventually want CockroachDB to be able to act as the entire state layer for web applications. We are currently addressing the SQL layer, and a full-text search like ElasticSearch is somewhere ahead on the product horizon. Since Cockroach Labs offered a flexible policy for work on experimental projects, I decided to use mine to experiment with implementing the Redis protocol on top of CockroachDB, attempting to answer the question: Could CockroachDB ever replace Redis?

Matt Jibson

Feb 4, 2016

automated-rebalance-by-rebekka-dunlap

Engineering

How we built easy row-level data homing in CockroachDB with REGIONAL BY ROW

In this blog post, we’ll explore the motivations behind the REGIONAL BY ROW abstraction, take a deeper dive into the abstraction itself, and look behind the scenes to understand how REGIONAL BY ROW works under the covers. We also have a hands-on demo for you to try out at the end, so you can play around with a toy multi-region cluster yourself!

Rebecca Taft

Mar 13, 2024