CockroachDB
Distributed, cloud-native SQL database with PostgreSQL compatibility, horizontal scaling, and strong consistency. Free tier includes a fully managed serverless cluster.
Use Cases
Free Tier
50 million request units, 10 GiB storage, and 250 GiB egress per month — no credit card required.
How to Maximize the Free Tier
CockroachDB's free tier is one of the most generous for SQL databases: 50M request units and 10 GiB storage per month. To stretch it, optimize queries to minimize RU consumption — each read and write costs RUs, so batch operations and avoid full table scans. Use secondary indexes carefully as they increase write RU cost. The cluster pauses after 5 minutes idle, which saves RUs but means cold starts. For development, use the free tier as a staging environment and switch to a paid plan only when you need multi-region or higher RU limits.
Getting Started
Sign up at cockroachlabs.com → click 'Start a free cluster' → choose 'Serverless' → select cloud provider (AWS/GCP) and region → create the cluster (~1 minute) → copy the connection string from the Connect dialog → install the CockroachDB client or use your existing PostgreSQL driver → connect and run CREATE DATABASE to start.
Pros
- Scalability: Auto-scales up to 3 nodes in the free tier, and scales to 30+ nodes on paid plans without code changes.
- PostgreSQL compatibility: Most PostgreSQL drivers, ORMs, and tools work without modification, making migration straightforward.
- Strong consistency: ACID transactions with global consistency — unlike many NoSQL alternatives, your data is always consistent across regions.
Cons
- RU limits: 50M RUs per month can be consumed quickly by frequent reads/writes; heavy workloads will hit the cap.
- Storage cap: 10 GiB is small for production-like datasets; you'll need to purge data or upgrade.
- Pause behavior: Clusters pause after 5 minutes of inactivity — wake-up adds 1-3 seconds latency, which can be annoying for interactive apps.