Blog
Engineering
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
Culture
Raft
Consensus Algorithm
Consensus
Engineering
Engineering
An experiment in fuzzy matching, using SQL, with CockroachDB
A recent tweet inspired me to address the need for fuzzy matching by combining some existing capabilities of CockroachDB. Note the key features mentioned in the tweet: - similar but not equal sporting events names: a common pattern. Users tend to mis-type data in input fields, and data isn’t always correct. Nevertheless, we’d like to return the closest match. - I’d rather use this in-built feature than pay for a whole ES cluster with added maintenance overhead to boot: This is the second time I’ve heard this sentiment in the past couple of months. ES is a full-featured search engine and delivers a great experience but, for this purpose, would be overkill and would require additional time and expense to deploy and operate.
Michael Goddard
Apr 18, 2022
Engineering
What write skew looks like
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. In this post I want to break down and capture exactly when the thing called “write skew” can happen.
Justin Jaffray
Mar 31, 2022
Engineering
Stan Rosenberg: Driving quality with Test Engineering
What does a Test Engineer do? The Test Engineering team (TestEng) is a new and exciting team embedded within Engineering. We are accomplished engineers on a quest for higher quality. Collectively, we have built complex and impressive software systems at startups and big tech, written test frameworks and program analysis tools; and even applied formal verification and automated reasoning. We have done all of those things and more while obsessing about correctness and performance, yet never quite achieving nirvana.
Stan Rosenberg
Mar 21, 2022
Engineering
Live betting on ACID: Challenges of building a next-gen gambling app
Imagine you’re watching a baseball game. In the middle of the fifth inning, your pitcher throws a strike, and then another one. The fan sitting next to you jumps to his feet in jubilant celebration. You could be forgiven for wondering what’s going on. After all, it takes three strikes to get a batter out – why is this guy dancing like the game is already over?
Charlie Custer
Dec 14, 2021
Engineering
Automated alert and aggregation rule generation for CockroachDB metrics
Like all software systems, metrics are crucial for understanding the inner workings of a system and getting a pulse on how that system is functioning. Any monitoring and debugging framework is incomplete without metrics.
Rima Deodhar
Dec 7, 2021
Engineering
What is connection pooling, and why should you care
As a developer, you may not have spent a lot of time thinking about database connections. A single database connection is not expensive, but as things scale up, problems can emerge. So let’s (ahem) dive into the world of connection pooling, and take a look at how it can help us build more performant applications, especially when we’re operating at scale.
Charlie Custer
Nov 30, 2021
Engineering
How to track "blipped" Marvel characters with Node.js and CockroachDB serverless
If you remember from the Marvel Avengers movies, one of the most critical and universe-defining events is “the blip” or “the snap.” This article will show you how to build a simple web app using Node.js that shows all the Marvel characters and their “blip” status, giving us the ability to update each character’s blip state on the database by clicking a button. We use Express.js as our framework and Pug for page templates and seed the database with character data from the official Marvel API while referencing our list of blipped and non-blipped characters to add a flag to the data. And, of course, CockroachDB Serverless is our database. Finally, we deploy our app to Heroku.
Raphael Mun
Oct 21, 2021
Engineering
What developers need to know about Kubernetes
Kubernetes is an open-source container orchestration platform that allows you to automate running and orchestrating container workloads. It is a powerful tool that offers a huge ecosystem of tools — package managers, service meshes, source plugins, monitoring tools, and more — as an abstraction layer for deploying standardized, full-stack applications across an ever-increasing range of platforms. Kubernetes is often referred to as “K8s.”
Michelle Gienow
July 14, 2021
Engineering
How to encrypt specific database tables with CockroachDB
A few days ago, we (Artem and Chris) were working with two different customers that had the same requirement: they needed to encrypt certain tables in their databases. This is not uncommon. Encryption comes with a slight performance penalty, so many companies prefer not to encrypt their entire database. Instead, the best practice is to encrypt only the tables that contain sensitive information, so less-sensitive data can be accessed without the overhead the encryption creates.
Artem Ervits
June 23, 2021