Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Ben Darnell
Isolation levels without the anomaly table
Experience the power of distributed SQL Try CockroachDB Free If you’ve ever read the section of your database documentation on transaction isolation, you’ve probably seen some version of this table: This particular anomaly table is from PostgreSQL 16, but most other databases have something similar in their documentation. For a long time CockroachDB was an exception: prior to version 23.2, CRDB only supported a single isolation level (SERIALIZABLE) so we didn’t need any comparison tables.
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.
Lessons learned from 2+ years of nightly Jepsen tests
Since the pre-1.0 betas of CockroachDB, we've been using Jepsen to test the correctness of the database in the presence of failures. We have re-run these tests every night as a part of our nightly test suite. Last fall, these tests found their first post-release bug. This blog post is a more digestible walkthrough of that discovery (many of the links here point to specific comments in that issue's thread to highlight the most important moments).
Scaling Raft
In CockroachDB, we use the Raft consensus algorithm to ensure that your data remains consistent even when machines fail. In most systems that use Raft, such as etcd and Consul, the entire system is one Raft consensus group. In CockroachDB, however, the data is divided into ranges, each with its own consensus group. This means that each node may be participating in hundreds of thousands of consensus groups.
Building an application with CockroachDB and SQLAlchemy
CockroachDB’s support for SQLAlchemy is currently in beta, but we’re actively developing new features to improve the integration. You can find the documentation here. One of the great things about CockroachDB’s support for SQL is the wide variety of frameworks and tools for working with SQL data. Today, we’ll demonstrate this by building a simple application in Python, using SQLAlchemy and Flask.
What write skew looks like
Free SQL Courses Free online learning platform covering distributed databases, cloud-native applications, general purpose SQL databases. Start Learning Syndication from What Does Write Skew Look Like by Justin Jaffray This post is about gaining intuition for Write Skew, and, by extension, Snapshot Isolation. Snapshot Isolation is billed as a transaction isolation level that offers a good mix between performance and correctness, but the precise meaning of “correctness” here is often vague.
How to talk about consistency and isolation in distributed DBs
Serializable transactions Learn more about serializable transactions in CockroachDB Docs The SQL standard defines four isolation levels (READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE). SNAPSHOT is a somewhat popular but non-standard addition to this list. People often reach for these words when they want to talk about behavior in CockroachDB in comparison to other databases, even when the behavior in question is not related to isolation.
3 basic rules for choosing indexes
Try Serverless Storage and transactional volumes automatically scale up or down to meet your app demands. Only pay for the capacity you use—and never for idle servers. Start instantly 3 basic rules for choosing indexes There are a few basic rules to keep in mind when choosing indexes for a database.
What are the Limits of the CAP Theorem?
*Note: This blog was originally published in 2017. Everything is still true today. It is being updated to include additional capabilities in CockroachDB. Namely, bounded staleness reads. The CAP theorem is a fundamental part of the theory of distributed systems. It states that in the presence of partitions (i.e. network failures), a system cannot be both consistent and available, and must choose one of the two.
Babyface: a Parental Leave Project
Get blog posts to your inbox. I recently returned to work following three months of parental leave for the birth of my first child. I spent most of that time doing what you’d expect: staring at the baby for hours, changing hundreds of diapers, and generally alternating between unwarranted confidence and complete uncertainty. But I also found a little time for some other projects, and I’d like to share one of them today.
Why We're Relicensing CockroachDB
Get blog posts to your inbox. CockroachDB was conceived of as open source software. In the years since it first appeared on GitHub, we’ve tread a relatively typical path in balancing open source with creating a viable business. We’ve kept our core code under the Apache License version 2 (APL), launched a managed service, and gated some features for established companies under an enterprise license.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Ben
Contact Ben, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack