Groww, a financial platform, migrated from MySQL to CockroachDB to support a cell-based architecture capable of 10x scale. MySQL's lack of native sharding and multi-cloud failover paths drove the decision. CockroachDB was chosen for its PostgreSQL compatibility, full ACID compliance, multi-region active-active deployment (RPO=0, RTO<10s), and its 'Regional By Row' feature that enables moving users between cells by updating a single column. Key migration challenges included eliminating auto-increment IDs (replaced with UUIDs or cached sequences), fixing sequential index hotspots using hash-sharded indexes, and handling nullable column indexes with partial indexes. An automated pipeline was built to move data with minimal downtime. Part 2 will cover multi-region node deployment and cell-to-region mapping.
Table of contents
Understanding the Strategic ContextLimitations of the Previous MySQL-Based ArchitectureWhy CockroachDB?Key Challenges: Achieving Distributed SQL ReadinessGet Groww Engineering Team ’s stories in your inboxAutomating the MigrationConclusion and What is NextSort: