RFC: Bounded Staleness Reads
Follower reads are a key feature for developers using multi-region databases. They allow read-only queries to be served by any replica, ensuring low-latency access to all data in a database regardless of data homing. CockroachDB initially introduced exact staleness reads, which select how far in the past to read and then send the request to the nearest copy of the requested data. However, this approach can cause issues when the guess is wrong, leading to additional latency or redirection to the leaseholder. To address these issues, CockroachDB is exploring bounded staleness reads, which dynamically determine the optimal timestamp to read at, minimizing staleness and ensuring local query serving without blocking. This new approach provides a more predictable solution in the presence of replication slowdown but comes with a small performance cost and can only be used in single-statement transactions.
Company
Cockroach Labs
Date published
Aug. 31, 2021
Author(s)
Nathan VanBenschoten
Word count
540
Language
English
Hacker News points
1