Living without atomic clocks: Where CockroachDB and Spanner diverge
CockroachDB borrows Spanner's TrueTime-inspired approach to ordering distributed transactions but replaces atomic-clock-bounded certainty with a looser uncertainty interval and uncertainty restarts. Spanner waits out a tight TrueTime bound (about 7 ms) after writes to guarantee linearizability, while CockroachDB assigns provisional timestamps from local wall clocks and retries reads that hit keys within the clock-offset uncertainty interval, providing serializability rather than linearizability. The tradeoff is occasional read restarts—bounded by the configured maximum clock offset, up to roughly 250 ms with NTP—instead of delaying every write; CockroachDB also uses causality tokens to preserve ordering across causally related transactions. Nodes that exceed the maximum configured clock offset self-terminate.
Related posts
- Orbital Computing and Distributed Databases | CockroachDB
Cockroach Labs mediumAdeptOrbital compute creates a harder problem for stateful systems than for GPUs: data must be replicated, coordinated and placed across a moving constellation. CockroachDB's existing mechanisms—Raft quorum commits, locality-aware replica placement, leaseholders and hybrid logical clocks—map onto orbital localities, but locality becomes temporal because the best node for reads or quorum changes as satellites move. Latency ranges from a few milliseconds within a plane to 30–80 ms across the constellation, while relativistic clock drift at 550 km is about 23 microseconds per day, negligible against the default 500 ms clock-skew tolerance. The practical tradeoff is hybrid storage: keep hot, latency-sensitive data near orbital compute and sink cold durable data to ground stations, accepting a 3.67 ms round trip when necessary.
- RAMP-TAO: Layering atomic transactions on Facebook’s online graph store
Meta Engineering hardMasterRAMP-TAO is a protocol that layers read-atomic transactional guarantees on top of TAO, Facebook's eventually consistent social graph store, so developers get an intuitive read transaction API without handling fractured-read anomalies. Adapted from Read Atomic Multi-Partition (RAMP) protocols in a "bolt-on" style, it guards only recent, transactionally updated data and relies on eventual consistency for everything else, so non-transactional workloads pay no cost. Production feasibility results show 0.42% memory overhead, over 99.9% of reads completing in one round-trip to the local cache, and tail latency on par with existing TAO reads. The layered design is cache-friendly, hotspot tolerant and proposed as applicable to other read-optimized stores.
- CockroachDB Redefines Database Performance with Real-World Testing
Cockroach Labs hardMasterCockroach Labs argues that traditional benchmarks like TPC-C, designed in 1992, measure peak throughput in pristine lab conditions and end the test once a power pull disrupts steady state, so they say nothing about behavior during failures, maintenance or recovery. Their proposed "Performance under Adversity" methodology runs seven escalating phases in one continuous run: baseline, internal operational stress (CDC, backups, schema changes, rolling upgrades), disk stalls, network failures, node restarts, zone outages and regional outages, measuring tpmC throughput, p90/p95 latency and recovery time to baseline. The runs used CockroachDB 25.1 across three geographic regions with fault scripts published in the repository, though they depend on internal tooling and cloud accounts and cannot be run as-is. The accompanying interactive dashboard replays the scenarios; no comparative results against other databases are given.
- Evolving our real-time timeseries storage again: Built in Rust for performance at scale
Datadog Engineering hardMasterDatadog's sixth-generation real-time timeseries database (RTDB) is a Rust rewrite that unifies two earlier engines, one for scalar metrics and one for DDSketch distributions, after earlier generations built on Cassandra, Redis, MDBM, a Go B+ tree and RocksDB. Its storage engine, Monocle, is an LSM tree with a worker-per-shard, thread-per-core design. Kafka intake tasks route data over per-shard MPSC channels to single-threaded Tokio shards, which keeps locks off the write path. Permit-based throttling and CoDel-based cost scheduling keep the system stable under load, and snapshots provide recovery. Datadog reports 60x higher ingestion throughput and 5x faster queries at peak scale.
- Deno KV internals: building a database for the modern web
Deno hardMasterDeno KV's production backend runs on FoundationDB, with a custom "transaction layer" in front of it that handles multi-tenant configuration, JavaScript-native types such as bigint sums, and cross-region replication. To keep latency low, every atomic operation is non-interactive: a single bag of versionstamp checks, set/delete writes and conflict-free mutations that completes in one or two network trips. A sequencer assigns monotonic transaction sequence numbers, and an evaluator turns each batch into a dataflow graph of AND/MUX operations and evaluates it concurrently. Results are reused speculatively before a writer commits them to FoundationDB, which raises throughput without locks.