cockroach VS tidb

Compare cockroach vs tidb and see what are their differences.

cockroach

CockroachDB - the open source, cloud-native distributed SQL database. (by cockroachdb)

tidb

TiDB is an open source distributed HTAP database compatible with the MySQL protocol (by pingcap)
Our great sponsors
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • Scout APM - A developer's best friend. Try free for 14-days
  • SaaSHub - Software Alternatives and Reviews
cockroach tidb
23 7
22,535 29,655
1.7% 1.8%
10.0 10.0
6 days ago 5 days ago
Go Go
GNU General Public License v3.0 or later Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

cockroach

Posts with mentions or reviews of cockroach. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-30.
  • Composing generic data structures in go
    3 projects | dev.to | 30 Nov 2021
    Recently a colleague, Nathan, reflecting on CockroachDB, remarked (paraphrased from memory) that the key data structure is the interval btree. The story of Nathan’s addition of the first interval btree to cockroach and the power of copy-on-write data structures is worthy of its own blog post for another day. It’s Nathan’s hand-specialization of that data structure that provided the basis (and tests) for the generalization I’ll be presenting here. The reason for this specialization was as much for the performance wins of avoiding excessive allocations, pointer chasing, and cost of type assertions when using interface boxing.
  • Stacked changes: how FB and Google engineers stay unblocked and ship faster
    12 projects | news.ycombinator.com | 17 Nov 2021
    I'm surprised Reviewable[0] hasn't come up in this discussion. It does a great job of allowing stacked code reviews and even handles rebases nicely; the reviewer sees the diff between commit #1 and commit #1' (prime = after rebase).

    CockroachDB[1] has been using it since very early in the project.

    [0] https://reviewable.io/

    [1] https://github.com/cockroachdb/cockroach

  • 1 project | reddit.com/r/facepalm | 6 Nov 2021
    And even if you did want to run your database on a bunch of untrusted machines, a blockchain, being a linked list, is not a particularly efficient implementation. Its size increases linearly with the number of operations, which, for any rapid-fire application such as banking, means you have a tremendously inefficient marginal computational and storage cost per operation. You’d be considerably better off running something like Cockroach, or FoundationDB, or more ‘out-there’ offerings like Hypercore.
  • CockroachDB Grants and Schemas explained
    1 project | dev.to | 28 Aug 2021
    And here: https://github.com/cockroachdb/cockroach/issues/16790
  • Design to Duty: How we make architecture decisions at Adyen
    1 project | dev.to | 28 Jul 2021
    As you now know, we do not want to achieve this by restricting payments of some merchants to certain machines, as this would mean the machines are no longer linearly scalable. The information needs to be available locally, so we eventually decided on integrating Cockroach, a distributed database, with our PALs.
  • go startpack
    8 projects | dev.to | 15 Jul 2021
    CockroachDB (label: E-easy) The Scalable, Survivable, Strongly-Consistent SQL Database
  • The start of my journey learning Go. Any tips/suggestions would greatly appreciated!
    6 projects | reddit.com/r/golang | 29 Jun 2021
  • What is Cost-based Optimization?
    4 projects | dev.to | 2 Jun 2021
    In CockroachDB, the cost is an abstract 64-bit floating-point scalar value.
  • #30DaysofAppwrite : Appwrite’s building blocks
    3 projects | dev.to | 3 May 2021
    Appwrite uses MariaDB as the default database for project collections, documents, and all other metadata. Appwrite is agnostic to the database you use under the hood and support for more databases like Postgres, CockroachDB, MySQL and MongoDB is currently under active development! 😊
  • I am building a Serverless version of Redis - written in Rust
    7 projects | reddit.com/r/rust | 2 May 2021
    For me, if you look back to when Redis has been designed - 11 years ago, it was before the Cloud was a thing. Since then, you have Cloud alternatives that are mostly proprietary. The idea of RedisLess is not competing against a product that is existing for 11 years but showing a new path of how we can build a system on top of an existing one. You can see RedisLess as experimentation. How to build Cloud-native databases by taking advantage of existing solutions? TiDB, Yugabyte, CockroachDB are great examples of being MySQL wire protocol compatible and providing a Cloud way of managing data.

tidb

Posts with mentions or reviews of tidb. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-05-31.
  • Comparing Nginx Performance in Bare Metal and Virtual Environments
    1 project | news.ycombinator.com | 29 Oct 2021
    I do agree with you in that regard, however, that's also a dangerous line of thinking.

    There are attempts to provide horizontal scalability for RDBMSes in a transparent way, like TiDB https://pingcap.com/ (which is compatible with the MySQL 5.7 drivers), however, the list of functionality that's sacrificed to achieve easily extensible clusters is a long one: https://docs.pingcap.com/tidb/stable/mysql-compatibility

    There are other technologies, like MongoDB, which sometimes are more successful at a clustered configuration, however most of the traditional RDBMSes work best in a leader-follower type of replication scenario, because even those aforementioned systems oftentimes have data consistency issues that may eventually pop up.

    Essentially, my argument is that the lack of good horizontally scalable databases or other data storage solutions is easily explainable by the fact that the problem itself isn't solvable in any easy way, apart from adopting eventual consistency, which is probably going to create more problems than it will solve in case of any pre-existing code that makes assumptions about what ways it'll be able to access data and operate on it: https://en.wikipedia.org/wiki/Fallacies_of_distributed_compu...

    To that end, i'd perhaps like to suggest an alternative: use a single vertically scalable RDBMS instance when possible, with a hot standby if you have the resources for that. Let the architecture around it be horizontally scalable instead, and let it deal with the complexities of balancing the load and dealing with backpressure - introduce a message queue if you must, maybe even an in-memory one for simplicity's sake, or consider an event based architecture where "what needs to be done" is encapsulated within a data structure that can be passed around and applied whenever possible. In my eyes, such solutions can in many cases be better than losing the many benefits of having a single source of truth.

    Alternatively, consider sharding as a possibility, or, alternatively, do some domain driven design, figure out where to draw some boundaries and split your service into multiple ones that cover the domain with which you need to work with. Then you have one DB for sales, one for account management, one for reports and so on, all separated by something as simple as REST interfaces and with rate limits or any of the other mechanisms.

    If, however, neither of those two groups of approaches don't seem to be suitable for the loads that you're dealing with, then you probably have a team of very smart people and a large amount of resources to figure out what will work best.

    To sum up, if there are no good solutions in the space, perhaps that's because the problems themselves haven't been solved yet. Thus, sooner or later, they'll need to be sidestepped and their impact mitigated in whatever capacity is possible.

  • Question regarding computing industry
    1 project | reddit.com/r/NTU | 20 Jun 2021
    My knowledge is still quite limited because I never worked on the internals of distributed databases (I've only used and deployed them as an intern) but I have taken Advanced Databases CZ4031 in NTU and Parallel and Distributed Algorithms CS4231 in NUS which helped me get some basic understanding so you can consider taking those if you are interested. If you want to see how an open source database looks like, I would recommend TiDB because their documentation is quite good.
  • Oceanbase, yet another open source HTAP database
    3 projects | news.ycombinator.com | 31 May 2021
    Another Chinese database seems to be doing a better job at this front: https://github.com/pingcap/tidb
  • TiDB Cloud Now in Public Preview
    1 project | reddit.com/r/Database | 28 May 2021
    TiDB is the leading open-source, MySQL compatible, distributed NewSQL database in the industry that supports hybrid transactional and analytical processing (HTAP), which allows businesses to run real-time analytical queries. It also features horizontal scalability, strong consistency, and high availability.
  • Can I anyone give me a proper Database black up solution
    2 projects | reddit.com/r/cscareerquestions | 23 May 2021
    TiDB (pingcap.com) wraps around MySql, and implements consensus algorithms to parallelize SQL.
  • TiGraph: 8,700x Computing Performance Achieved by Combining Graphs + the RDBMS Syntax
    1 project | dev.to | 5 Apr 2021
    The three hackers on the TiGraph team are all top developers in the TiDB community:
  • Gopher Gold #16 - Wed Oct 21 2020
    14 projects | dev.to | 21 Oct 2020
    pingcap/tidb (Go): TiDB is an open source distributed HTAP database compatible with the MySQL protocol

What are some alternatives?

When comparing cockroach and tidb you can also consider the following projects:

vitess - Vitess is a database clustering system for horizontal scaling of MySQL.

go-mysql-elasticsearch - Sync MySQL data into elasticsearch

Trino - Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)

InfluxDB - Scalable datastore for metrics, events, and real-time analytics

yugabyte-db - The high-performance distributed SQL database for global, internet-scale apps.

dgraph - Native GraphQL Database with graph backend

go-mysql - a powerful mysql toolset with Go

rqlite - The lightweight, distributed relational database built on SQLite

go-memdb - Golang in-memory database built on immutable radix trees

kingshard - A high-performance MySQL proxy