Devsisters Adopts CockroachDB as the Main DB for Cookie Run: Kingdom… Shares Distributed Environment Optimization Case
Key point
Devsisters adopted CockroachDB as the main database for Cookie Run: Kingdom, securing horizontal scalability and fault tolerance.
Details
Devsisters is running CockroachDB as the main database for its mobile game Cookie Run: Kingdom. To meet requirements suited for Write-Heavy workloads and capable of rapid horizontal scaling during sudden user surges, the company evaluated various candidates including MySQL, PostgreSQL, and NoSQL.
Performance and Scalability Verification
Comparing p50/p99 latency and scalability across DynamoDB, Aurora, and CockroachDB, CockroachDB showed the best performance in p99 latency. Aurora had limits on horizontal scaling, while DynamoDB required Hot Partition management. CockroachDB was ultimately adopted because it allows scaling simply by adding nodes and supports zero-downtime operation.
Architecture and Operational Strategy
CockroachDB supports the PostgreSQL protocol and guarantees serializable isolation level for all transactions. Data is partitioned into Range units, replicated across multiple nodes, and maintains consistency through the Raft consensus algorithm. It applies MVCC to support Time Travel Query, which is used for read load distribution.
Hotspot Prevention and Multi-Region Deployment
To prevent Hot Range occurrences caused by sharp traffic influx during the early stages of a game launch, it is recommended to apply UUID or randomness to the Primary Key, or use a Hash-sharded index. Additionally, setting Locality flags to distribute each Range's replicas across different availability zones (AZs) is necessary to reduce the risk of data loss. Devsisters shared a case where it experienced an outage due to not initially configuring Locality, and later improved upon this.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.