Handling Contention with CockroachDB
The end of the year is such a busy time! As a follow-up to my last blog post about Handling Contention with PostgreSQL, here’s a post that digs into how CockroachDB handles contention. Like PostgreSQL, CockroachDB uses MVCC to figure out the right version of data to read, as well as to enforce a sense of order across committed transactions. However, CockroachDB faces some unique challenges in picking the right timestamp for MVCC and handling conflicts given that CockroachDB needs to track timestamps and transactions across multiple distributed physical nodes.
It’s important to understand at a high level how internals work in order to reason about performance and understand why a system like CockroachDB results in more transaction retries than a system like PostgreSQL. I hope you enjoy, and happy holidays! As always, you can ready out to me on Twitter @Dianasaur323.