Skip to content

Commit

Permalink
[WIP] rfc: Non-Blocking Transactions
Browse files Browse the repository at this point in the history
Non-blocking transactions are a variant of CockroachDB's standard transaction
protocol that are optimized for writing to read-mostly or read-only (excluding
maintenance events) data. The transaction protocol and the replication schema
that it is paired with differ from standard read-write transactions in two
important ways:
- non-blocking transactions support a replication scheme over the Ranges that
  they operate on which allow all followers to perform **non-stale** follower
  reads.
- non-blocking transactions are **minimally disruptive** to reads over the data
  that they modify, even in the presence of read/write contention.

The ability to serve reads from follower replicas is beneficial both because it
can reduce read latency in geo-distributed deployments and because it can serve
as a form of load-balancing for concentrated read traffic in order to reduce
tail latencies. The ability to serve **non-stale** follower reads makes the
functionality applicable to a far larger class of read-only and read-write
transactions.

The ability to perform writes on read-heavy data without causing conflicting
reads to block for long periods of time is beneficial for providing predictable
read latency. When customers ask for the `READ COMMITTED` isolation level, this
is what they are actually asking for.

This proposal serves as an alternative to the [Consistent Read Replicas
proposal](#39758). Whereas the
Consistent Read Replicas proposal enforces consistency through communication,
this proposal enforces consistency through semi-synchronized clocks with bounded
uncertainty.
  • Loading branch information
nvanbenschoten committed Aug 13, 2020
1 parent 8ee22d0 commit 6e142e9
Showing 1 changed file with 674 additions and 0 deletions.
Loading

0 comments on commit 6e142e9

Please sign in to comment.