{"id":37154977,"url":"https://github.com/ggaaooppeenngg/cockroachkv","last_synced_at":"2026-01-14T18:19:30.387Z","repository":{"id":57611589,"uuid":"83412015","full_name":"ggaaooppeenngg/cockroachkv","owner":"ggaaooppeenngg","description":"CockroachKV - the scalable, survivable, strongly-consistent key value database","archived":false,"fork":true,"pushed_at":"2017-05-08T14:04:50.000Z","size":310838,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T03:32:35.778Z","etag":null,"topics":["distributed-database","key-value-database","transaction"],"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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ggaaooppeenngg.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":null,"support":null}},"created_at":"2017-02-28T09:07:01.000Z","updated_at":"2017-04-11T08:53:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ggaaooppeenngg/cockroachkv","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/ggaaooppeenngg/cockroachkv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggaaooppeenngg%2Fcockroachkv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggaaooppeenngg%2Fcockroachkv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggaaooppeenngg%2Fcockroachkv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggaaooppeenngg%2Fcockroachkv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggaaooppeenngg","download_url":"https://codeload.github.com/ggaaooppeenngg/cockroachkv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggaaooppeenngg%2Fcockroachkv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28430346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["distributed-database","key-value-database","transaction"],"created_at":"2026-01-14T18:19:29.616Z","updated_at":"2026-01-14T18:19:30.374Z","avatar_url":"https://github.com/ggaaooppeenngg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CockroachDB](docs/media/cockroach_db.png?raw=true \"CockroachDB logo\")\n=======================================================================\n\nCockroachDB is a scalable, survivable, strongly-consistent SQL database.\n\n[![TeamCity CI](https://teamcity.cockroachdb.com/guestAuth/app/rest/builds/buildType:(id:Cockroach_UnitTests)/statusIcon.svg)](https://teamcity.cockroachdb.com/viewLog.html?buildTypeId=Cockroach_UnitTests\u0026buildId=lastFinished\u0026guest=1)\n[![GoDoc](https://godoc.org/github.com/cockroachdb/cockroach?status.svg)](https://godoc.org/github.com/cockroachdb/cockroach)\n![Project Status](https://img.shields.io/badge/status-beta-yellow.svg)\n[![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- [What is CockroachDB?](#what-is-cockroachdb)\n- [Docs](#docs)\n- [Quickstart](#quickstart)\n- [Client Drivers](#client-drivers)\n- [Deployment](#deployment)\n- [Need Help?](#need-help)\n- [Contributing](#contributing)\n- [Design](#design)\n- [Comparison with Other Databases](#comparison-with-other-databases)\n- [See Also](#see-also)\n\n## What is CockroachDB?\n\nCockroachDB is a distributed SQL database built on a transactional and\nstrongly-consistent key-value store. It **scales** horizontally;\n**survives** disk, machine, rack, and even datacenter failures with\nminimal latency disruption and no manual intervention; supports\n**strongly-consistent** ACID transactions; and provides a familiar\n**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[1.0 Roadmap](https://github.com/cockroachdb/cockroach/issues/12854) 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## Need Help?\n\n- [CockroachDB Forum](https://forum.cockroachlabs.com/) - Ask\n  questions, find answers, and help other users.\n\n- [Join us on Gitter](https://gitter.im/cockroachdb/cockroach) - This\n  is the most immediate way to connect with CockroachDB engineers.\n\n- For filing bugs, suggesting improvements, or requesting new\n  features, help us out by\n  [opening an issue](https://github.com/cockroachdb/cockroach/issues/new).\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## 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). \n\nFor another quick design overview, see the [CockroachDB tech talk slides](https://docs.google.com/presentation/d/1tPPhnpJ3UwyYMe4MT8jhqCrE9ZNrUMqsvXAbd97DZ2E/edit#slide=id.p).\n\n### Design Goals\n\nCockroachDB is a distributed SQL database built on top of a\ntransactional and consistent key:value store.\n\nThe primary design goals are support for ACID transactions, horizontal scalability and survivability, hence the name. \n\nIt aims to tolerate disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention. \n\nCockroachDB nodes (RoachNodes) are symmetric; a design goal is homogeneous deployment (one binary) with minimal configuration.\n\n### How it Works in a Nutshell\n\nCockroachDB implements a single, monolithic sorted map from key to value\nwhere both keys and values are byte strings (not unicode). \n\nThe map is composed of one or more ranges and each range is backed by\ndata stored in [RocksDB][0] (a variant of [LevelDB][1]), and is\nreplicated to a total of three or more CockroachDB servers. This\nenables CockroachDB to scale linearly — theoretically up to 4 exabytes\n(4E) of logical data.\n\nRanges are defined by start and end keys. Ranges are merged and split\nto maintain total byte size within a globally configurable min/max\nsize interval. Range sizes default to target 64M in order to\nfacilitate quick splits and merges and to distribute load at hotspots\nwithin a key range. Range replicas are intended to be located in\ndisparate datacenters for survivability (e.g. `{ US-East, US-West,\nJapan }`, `{ Ireland, US-East, US-West}` , `{ Ireland, US-East,\nUS-West, Japan, Australia }`).\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 also\nstored in [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## Comparison with Other Databases\n\nTo see how key features of CockroachDB stack up against other databases, \nvisit the [CockroachDB in Comparison](https://www.cockroachlabs.com/docs/cockroachdb-in-comparison.html) page hosted on our docs site. \n\n## See Also\n\n- [Tech Talks](https://www.cockroachlabs.com/docs/tech-talks.html) by CockroachDB founders and engineers\n- [The CockroachDB User documentation](https://cockroachlabs.com/docs/)\n- [The CockroachDB Blog](https://www.cockroachlabs.com/blog/)\n- Key Design documents:\n  - [Serializable, Lockless, Distributed: Isolation in CockroachDB](https://www.cockroachlabs.com/blog/serializable-lockless-distributed-isolation-cockroachdb/)\n  - [Consensus, Made Thrive](https://www.cockroachlabs.com/blog/consensus-made-thrive/)\n  - [Trust, But Verify: How CockroachDB Checks Replication](https://www.cockroachlabs.com/blog/trust-but-verify-cockroachdb-checks-replication/)\n  - [Living Without Atomic Clocks](https://www.cockroachlabs.com/blog/living-without-atomic-clocks/)\n  - [The CockroachDB Architecture Document](https://github.com/cockroachdb/cockroach/blob/master/docs/design.md)\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%2Fggaaooppeenngg%2Fcockroachkv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggaaooppeenngg%2Fcockroachkv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggaaooppeenngg%2Fcockroachkv/lists"}