🎉
CockroachDB 1.0 is now available! Get more details in this blog post.

CockroachDB Core

A SQL database designed to grow with you.

Distributed SQL

Get started quickly with distributed SQL that grows with your application

  • Install in seconds and scale horizontally with no application-level changes.
  • Use existing PostgreSQL client drivers or supported ORMs.
  • Interface with a robust SQL API that supports distributed ACID transactions, foreign keys, secondary indexes, JOINs, aggregations, and zero-downtime schema changes.
Learn about SQL support
$ brew install cockroachdb/cockroach/cockroach

$ cockroach start

CockroachDB node starting at 2017-05-10 16:35:27
build: v1.0 @ 2017/05/10 20:27:23 (go1.8.1)
admin: http://localhost:8080
postgresql: //[email protected]:26257
logs: cockroach-data/logs
store[0]: path=cockroach-data
status: initialized new cluster
clusterID: 801c40b-9d65-4991-b051-bd16108dc92
nodeID: 1
Class.forName("org.postgresql.Driver");

Connection db = DriverManager.getConnection("jdbc:postgresql://localhost:26257/bank", "maxroach", "");

try {db.createStatement().execute("CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)");
db.createStatement().execute("INSERT INTO accounts (id, balance) VALUES (1, 1000), (2, 250)");
$ cockroach sql

# Welcome to the cockroach SQL interface.
# All statements must be terminated by a semicolon.
# To exit: CTRL + D.

> CREATE DATABASE bank;
CREATE DATABASE

> CREATE TABLE bank.accounts (
id INT PRIMARY KEY,
balance DECIMAL
);

CREATE TABLE

> INSERT INTO accounts VALUES (1, 10000.50);
INSERT 1
A world map with bright, connected nodes throughout.
Always-on services

Maintain data integrity at scale

  • Provide always-on services with multi-active availability, a new standard of availability that uses groups of symmetric nodes to intelligently agree on write success. Once consensus is reached, writes are instantly readable from any node in the cluster.
  • Send R/W traffic to any CockroachDB node - all nodes are symmetric and serve as client gateways.
  • Dynamically load balance to healthy nodes instead of using complex and error-prone failover setups.
Demo survivability
CockroachDB admin dashboard
Cloud-Native

Run your application with cloud-native features built-in

  • Achieve greater data redundancy and availability with consistent replication across nodes.
  • Simplify ops with self-organizing nodes that support automatic scaling, failover, replication, and repair.
  • Monitor cluster health and performance through the admin UI.
Learn more
Two chat message windows
Developer Support

100% Open Source & Developer Support

  • Build your own plug-ins to integrate with your existing tools.
  • Contribute back to the project.
  • Get support from developers using and building CockroachDB.
Explore developer resources
Run on any cloud or on-premise
Install in seconds and deploy a single binary with no dependencies.