其他分享
首页 > 其他分享> > TiDB-vs-CockroachDB

TiDB-vs-CockroachDB

作者:互联网

CockroachDB

TiDB

TiDB系统架构图

在这里插入图片描述

TiDB存储架构图

在这里插入图片描述

TiDB计算层架构图

在这里插入图片描述

引入TiDB调度节点能够解决的问题

TiDB vs CockroachDB

表格对比

NameCockroachDBTiDB
DescriptionCockroachDB is a distributed database architected for modern cloud applications. It is wire compatible with PostgreSQL and backed by a Key-Value Store, which is either RocksDB or a purpose-built derivative, called Pebble.TiDB is an open source distributed Hybrid Transactional/Analytical Processing (HTAP) database that supports MySQL and Spark SQL syntaxes.
Primary database modelRelational DBMSRelational DBMS
Websitewww.cockroachlabs.compingcap.com
Technical documentationwww.cockroachlabs.com/­docsdocs.pingcap.com/­tidb/­stable
DeveloperCockroach LabsPingCAP, Inc.
Initial release20152016
Current release20.2, November 20204.0.10 , January 2021
LicenseOpen SourceOpen Source
Cloud-based onlynono
Implementation languageGoGo, Rust
Server operating systemsLinux macOS WindowsLinux
Data schemedynamic schemayes
Typingyesyes
XML supportnono
Secondary indexesyesyes
SQLyes, wire compatible with PostgreSQLyes
APIs and other access methodsJDBCJDBC
ODBC
Proprietary protocol
Supported programming languagesC#
C++
Clojure
Go
Java
JavaScript (Node.js)
PHP
Python
Ruby
Rust
Ada
C
C#
C++
D
Delphi
Eiffel
Erlang
Haskell
Java
JavaScript (Node.js)
Objective-C
OCaml
Perl
PHP
Python
Ruby
Scheme
Tcl
Server-side scriptsnono
Triggersnono
Partitioning methodshorizontal partitioning (by key range)horizontal partitioning (by key range)
Replication methodsMulti-source replication using RAFTUsing Raft consensus algorithm to ensure data replication with strong consistency among multiple replicas.
MapReducenoyes
Consistency conceptsImmediate ConsistencyImmediate Consistency
Foreign keysyesno
Transaction conceptsACIDACID
Concurrencyyesyes
Durabilityyesyes
In-memory capabilitiesnono
User conceptsRole-based access controlUsers with fine-grained authorization concept. No user groups or roles.

区别概览

参考资料

TiDB和CockroachDB同为Spanner/F1的开源实现,有哪些重大差异?
https://www.zhihu.com/question/60686555

https://rocksdb.org.cn/doc/getting-started.html
RocksDB是使用C++编写的嵌入式kv存储引擎,其键值均允许使用二进制流。由Facebook基于levelDB开发, 提供向后兼容的levelDB API。
RocksDB针对Flash存储进行优化,延迟极小。RocksDB使用LSM存储引擎,纯C++编写。
NewSQL TiDB vs CockroachDB
https://blog.csdn.net/vkingnew/article/details/88559050

CAP理论表明了对于一个分布式的系统在以下3种保证中同时实现超过两种是不可能的:

Consistency(一致性)
Availability(可用性)
Partition Tolerance(分区容错性)

标签:存储,TiKV,vs,集群,TiDB,CockroachDB,节点
来源: https://blog.csdn.net/xys2015/article/details/114922443