CockroachDB
lastmod 2024-12-11created 2015-12-194 edits
CockroachDB was created by former Google employees, who made a large-enterprise data solution open source. CockroachDB is a highly scalable, geographically distributed and replicated transactional data store.
Google developed Spanner to maintain terabytes of data transacted through its global online properties. This powerful tool gives Google scalability, survivability, and transactional capabilities, and the CockroachDB team brought these characteristics straight to the open-source community. Like a real cockroach, CockroachDB can survive without its head. That is, it can keep operating even if any node fails. This open-source project has a solid community of veteran contributors. The founders are also actively building the community through social media, GitHub, networking, conferences, and meetups.
One of 7 databases for 2025
- See Database#7 databases for 2025 (GeekNews)
- CockroachDB is a globally distributed database
- Compatible with the PostgreSQL wire protocol; supports horizontal scaling and strong consistency
- Its design is inspired by Google Spanner and enables scaling a database across multiple regions
- Time synchronization technology:
- Google Spanner uses atomic clocks and GPS clocks, but CockroachDB is designed to run on commodity hardware
- Corrects NTP-based synchronization delay, compares clock drift between nodes, and terminates members that exceed the maximum offset
- Multi-region configuration:
- The Table Localities feature allows optimization based on read/write trade-offs
- Data is distributed according to users' geographic locations, improving performance and latency
- Reimplement the MovR example:
- Implement MovR (a distributed application example) using the language and framework of your choice
- Experiment with designing global applications using CockroachDB's multi-region and scaling strategies
- Unlike other distributed databases such as DynamoDB, it can be run locally for free
- Offers the distinctive combination of strong consistency and global distribution
See also
Favorite site
- Github: cockroachdb project site
- CockroachDB web site
- The story of how our CTO bet his career and went down to the bit level to hack the DB
- The 36-hour outage of Cookie Run: Kingdom, the longest in Devsisters' history
- Used CockroachDB as the main distributed DB: 4 nodes, 12TB of storage, 7 replicas
- Half the nodes went down during a database scaling operation
- This caused a full service outage, and CockroachDB's support engineers judged recovery to be impossible
- So this post documents the efforts to find the data stored directly in storage