Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Cockroach Labs 18 min read Deep dive mediumAdept

Orbital Computing and Distributed Databases | CockroachDB

Orbital 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.

Related posts

  • Living without atomic clocks: Where CockroachDB and Spanner diverge

    Cockroach Labs hardMaster

    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.

  • How to build a multi-region Python app with CockroachDB, Django, and K8s

    Cockroach Labs mediumAdept

    Data domiciling in a Django app on CockroachDB works by adding a 'cloud' field to a Customers model, deploying the app to Kubernetes clusters in Azure, AWS and GCP, and pinning each row to a region. The setup uses a computed crdb_internal_region column with a CASE expression and REGIONAL BY ROW table locality. ALTER DATABASE ... PLACEMENT RESTRICTED then keeps non-voting replicas in the right locality, and replication constraint reports verify that violating ranges have moved. Pinning data cuts consensus round trips for lower write latency and helps meet data sovereignty requirements.

  • Evolving our real-time timeseries storage again: Built in Rust for performance at scale

    Datadog Engineering hardMaster

    Datadog'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.

  • How we stress test and benchmark CockroachDB for global scale

    Cockroach Labs easyNovice

    CockroachDB is exercised on a regular cadence of daily, weekly and per-release benchmarks, plus ad hoc and customer-partnered tests, mainly TPC-C, TPC-E and a YCSB-like KV workload. Reported figures include about 3,000–3,500 txn/s on a 3-node TPC-C cluster and 1.7M tpmC on 81 nodes. KV write throughput scaled from 160k QPS on 20 nodes to 1.2M QPS on 200 nodes, and TPC-E reached 40K txn/s on 96 nodes. Long-running release tests run workloads while backups, changefeeds, upgrades, schema changes and regional failures happen concurrently. That testing led to a recommendation not to use expiration-based leases above 10,000 ranges per node.

  • The hidden latency inside your database

    PlanetScale easyNovice

    Cloud databases on network-attached storage like EBS pay a network round trip on every disk operation, a cost that became the dominant bottleneck once SSDs made disks ~100x faster than spinning drives. PlanetScale Metal runs databases on local NVMe instead, getting durability from a primary plus at least two replicas across availability zones, with each commit acknowledged by one replica before returning to the client. Reads never cross the network and IOPS are uncapped: an i7i with local NVMe (~300,000 IOPS) cost $551/month versus $1,514 for an r7i with a 16,000-IOPS io2 volume. Workloads whose hot data fits in RAM with low write volume may not need it. Signs you do are frequent cache misses, hitting EBS IOPS limits, or low CPU usage with high latency.

The quest for software engineering knowledge.

Look:
Layout: