{"id":37175435,"url":"https://github.com/codepope/cockroach","last_synced_at":"2026-01-14T20:29:03.119Z","repository":{"id":57599546,"uuid":"60848698","full_name":"codepope/cockroach","owner":"codepope","description":"A Scalable, Survivable, Strongly-Consistent SQL Database","archived":false,"fork":true,"pushed_at":"2016-06-10T19:43:17.000Z","size":182527,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T14:19:52.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.cockroachlabs.com","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cockroachdb/cockroach","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codepope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security/auth.go","support":null}},"created_at":"2016-06-10T13:13:31.000Z","updated_at":"2024-06-20T14:19:52.897Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/codepope/cockroach","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/codepope/cockroach","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepope%2Fcockroach","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepope%2Fcockroach/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepope%2Fcockroach/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepope%2Fcockroach/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codepope","download_url":"https://codeload.github.com/codepope/cockroach/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepope%2Fcockroach/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T20:29:02.276Z","updated_at":"2026-01-14T20:29:03.097Z","avatar_url":"https://github.com/codepope.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](/resource/doc/cockroach_db.png?raw=true \"Cockroach Labs logo\")\n\n\n[![Circle CI](https://circleci.com/gh/cockroachdb/cockroach.svg?style=svg)](https://circleci.com/gh/cockroachdb/cockroach) [![GoDoc](https://godoc.org/github.com/cockroachdb/cockroach?status.png)](https://godoc.org/github.com/cockroachdb/cockroach) ![Project Status](https://img.shields.io/badge/status-beta-yellow.svg) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cockroachdb/cockroach?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n## A Scalable, Survivable, Strongly-Consistent SQL Database\n\n- [What is CockroachDB?](#what-is-cockroachdb)\n- [Docs](#docs)\n- [Quickstart](#quickstart)\n- [Client Drivers](#client-drivers)\n- [Deployment](#deployment)\n- [Get In Touch](#get-in-touch)\n- [Contributing](#contributing)\n- [Tech Talks](#tech-talks)\n- [Design](#design)\n\n## What is CockroachDB?\n\nCockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It **scales** horizontally; **survives** disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports **strongly-consistent** ACID transactions; and provides a familiar **SQL** API for structuring, manipulating, and querying data.\n\nFor more details, see our [FAQ](https://cockroachlabs.com/docs/frequently-asked-questions.html) and original [design document](\nhttps://github.com/cockroachdb/cockroach#design).\n\n## Status\n\nCockroachDB is currently in beta. See our\n[Roadmap](https://github.com/cockroachdb/cockroach/wiki) and\n[Issues](https://github.com/cockroachdb/cockroach/issues) for a list of features planned or in development.\n\n## Docs\n\nFor guidance on installation, development, deployment, and administration, see our [User Documentation](https://cockroachlabs.com/docs).\n\n## Quickstart \n\n1.  [Install Cockroach DB](https://www.cockroachlabs.com/docs/install-cockroachdb.html).\n\n2.  [Start a local cluster](https://www.cockroachlabs.com/docs/start-a-local-cluster.html) with three nodes listening on different ports:\n\n    ```shell\n    $ ./cockroach start --background\n    $ ./cockroach start --store=cockroach-data2 --port=26258 --http-port=8081 --join=localhost:26257 --background\n    $ ./cockroach start --store=cockroach-data3 --port=26259 --http-port=8082 --join=localhost:26257 --background\n    ```\n\n3.  [Start the built-in SQL client](https://www.cockroachlabs.com/docs/use-the-built-in-sql-client.html) as an interactive shell:\n\n    ```shell\n    $ ./cockroach sql\n    # Welcome to the cockroach SQL interface.\n    # All statements must be terminated by a semicolon.\n    # To exit: CTRL + D.\n    ```\n\n4. Run some [CockroachDB SQL statements](https://www.cockroachlabs.com/docs/learn-cockroachdb-sql.html):\n\n    ```shell\n    root@:26257\u003e CREATE DATABASE bank;\n    CREATE DATABASE\n\n    root@:26257\u003e SET DATABASE = bank;\n    SET\n\n    root@:26257\u003e CREATE TABLE accounts (id INT PRIMARY KEY, balance DECIMAL);\n    CREATE TABLE\n\n    root@26257\u003e INSERT INTO accounts VALUES (1234, 10000.50);\n    INSERT 1\n\n    root@26257\u003e SELECT * FROM accounts;\n    +------+----------+\n    |  id  | balance  |\n    +------+----------+\n    | 1234 | 10000.50 |\n    +------+----------+\n    ```\n\n4. Checkout the admin UI by pointing your browser to `http://\u003clocalhost\u003e:8080`.\n\n5. CockroachDB makes it easy to [secure a cluster](https://www.cockroachlabs.com/docs/secure-a-cluster.html).\n\n## Client Drivers\n\nCockroachDB supports the PostgreSQL wire protocol, so you can use any available PostgreSQL client drivers to connect from various languages. For recommended drivers that we've tested, see [Install Client Drivers](https://www.cockroachlabs.com/docs/install-client-drivers.html).\n\n## Deployment\n\n-   [Manual](https://www.cockroachlabs.com/docs/manual-deployment.html) - Steps to deploy a CockroachDB cluster manually on multiple machines.\n\n-   [Cloud](https://github.com/cockroachdb/cockroach/tree/master/cloud/aws) - Configuration files and instructions for deploying an insecure development or test cluster on GCE or AWS using [Terraform](https://terraform.io/).\n\n## Get In Touch\n\nWhen you see a bug or have improvements to suggest, please open an [issue](https://github.com/cockroachdb/cockroach/issues).\n\nFor development-related questions and anything else, there are two easy ways to get in touch:\n\n-   [Join us on Gitter](https://gitter.im/cockroachdb/cockroach) - This is the best, most immediate way to connect with CockroachDB engineers.\n\n-   [Post to our Developer mailing list](https://groups.google.com/forum/#!forum/cockroach-db) - Please join first or you messages may be held back for moderation.\n\n## Contributing\n\nWe're an open source project and welcome contributions.\n\n1.  See [CONTRIBUTING.md](https://github.com/cockroachdb/cockroach/blob/master/CONTRIBUTING.md) to get your local environment set up.\n\n2.  Take a look at our [open issues](https://github.com/cockroachdb/cockroach/issues/), in particular those with the [helpwanted label](https://github.com/cockroachdb/cockroach/labels/helpwanted).\n\n3.  Review our [style guide](https://github.com/cockroachdb/cockroach/blob/master/CONTRIBUTING.md#style-guide) and follow our [code reviews](https://github.com/cockroachdb/cockroach/pulls) to learn about our style and conventions.\n\n4.  Make your changes according to our [code review workflow](https://github.com/cockroachdb/cockroach/blob/master/CONTRIBUTING.md#code-review-workflow).\n\n## Tech Talks\n\nFor recordings and slides from talks given by CockroachDB founders and engineers, see [Tech Talks](https://www.cockroachlabs.com/docs/tech-talks.html).\n\n## Design\n\nThis is an overview. For an in-depth discussion of the design and architecture, see the full [design doc](https://github.com/cockroachdb/cockroach/blob/master/docs/design.md). For another quick design overview, see the [CockroachDB tech talk slides](https://docs.google.com/presentation/d/1tPPhnpJ3UwyYMe4MT8jhqCrE9ZNrUMqsvXAbd97DZ2E/edit#slide=id.p).\n\n### Overview\nCockroachDB is a distributed SQL database built on top of a transactional and consistent key:value store. The primary design goals are support for ACID transactions, horizontal scalability and survivability, hence the name. CockroachDB implements a Raft consensus algorithm for consistency. It aims to tolerate disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention. CockroachDB nodes (RoachNodes) are symmetric; a design goal is homogeneous deployment (one binary) with minimal configuration.\n\nCockroachDB implements a single, monolithic sorted map from key to value\nwhere both keys and values are byte strings (not unicode). CockroachDB\nscales linearly (theoretically up to 4 exabytes (4E) of logical\ndata). The map is composed of one or more ranges and each range is\nbacked by data stored in [RocksDB][0] (a variant of [LevelDB][1]), and is\nreplicated to a total of three or more CockroachDB servers. Ranges are\ndefined by start and end keys. Ranges are merged and split to maintain\ntotal byte size within a globally configurable min/max size\ninterval. Range sizes default to target 64M in order to facilitate\nquick splits and merges and to distribute load at hotspots within a\nkey range. Range replicas are intended to be located in disparate\ndatacenters for survivability (e.g. `{ US-East, US-West, Japan }`, `{\nIreland, US-East, US-West}` , `{ Ireland, US-East, US-West, Japan,\nAustralia }`).\n\nSingle mutations to ranges are mediated via an instance of a\ndistributed consensus algorithm to ensure consistency. We’ve chosen to\nuse the [Raft consensus algorithm][2]. All consensus state is stored in\n[RocksDB][0].\n\nA single logical mutation may affect multiple key/value pairs. Logical\nmutations have ACID transactional semantics. If all keys affected by a\nlogical mutation fall within the same range, atomicity and consistency\nare guaranteed by [Raft][2]; this is the fast commit path. Otherwise, a\nnon-locking distributed commit protocol is employed between affected\nranges.\n\nCockroachDB provides snapshot isolation (SI) and serializable snapshot\nisolation (SSI) semantics, allowing externally consistent, lock-free\nreads and writes--both from an historical snapshot timestamp and from\nthe current wall clock time. SI provides lock-free reads and writes\nbut still allows write skew. SSI eliminates write skew, but introduces\na performance hit in the case of a contentious system. SSI is the\ndefault isolation; clients must consciously decide to trade\ncorrectness for performance. CockroachDB implements a limited form of\nlinearalizability, providing ordering for any observer or chain of\nobservers.\n\nSimilar to [Spanner][3] directories, CockroachDB allows configuration of\narbitrary zones of data. This allows replication factor, storage\ndevice type, and/or datacenter location to be chosen to optimize\nperformance and/or availability. Unlike Spanner, zones are monolithic\nand don’t allow movement of fine grained data on the level of entity\ngroups.\n\n#### SQL - NoSQL - NewSQL Capabilities\n\n![SQL - NoSQL - NewSQL Capabilities](/resource/doc/sql-nosql-newsql.png?raw=true)\n\n\n[0]: http://rocksdb.org/\n[1]: https://github.com/google/leveldb\n[2]: https://ramcloud.stanford.edu/wiki/download/attachments/11370504/raft.pdf\n[3]: http://research.google.com/archive/spanner.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepope%2Fcockroach","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodepope%2Fcockroach","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepope%2Fcockroach/lists"}