Home / Companies / Cockroach Labs / Blog / Post Details
Content Deep Dive

How to optimize write latency for global tables in CockroachDB

Blog post from Cockroach Labs

Post Details
Company
Date Published
Author
Jon St. John
Word Count
3,220
Language
English
Hacker News Points
21
Summary

The article by Jon St. John discusses the challenges and strategies for optimizing write latency in global tables within CockroachDB, a multi-region database. Global tables allow low-latency, non-stale reads from all regions but can suffer from high write latency, potentially reaching 800ms with default settings in globally distributed clusters. The article outlines several optimizations to reduce this latency, including adjusting the maximum clock offset, lowering the side transport interval, and utilizing measured network round-trip times, which can bring latency down to as low as 250ms. These improvements make global tables more viable for workloads with a high read-to-write ratio and where low read latency is crucial. The piece also highlights the trade-offs involved, such as increased CPU usage and network traffic, and provides guidance on measuring follower read efficiency to ensure optimal configuration.