6 Ağustos 2021 Cuma

CockroachDB

Giriş
Açıklaması şöyle
CockroachDB is a globally distributed SQL database constructed on top of a transactional and consistent key-value store that you can use everywhere. The database tool is optimized for the cloud to deliver guaranteed transactions for local and globally distributed workloads and it allows you to build global, scalable and resilient cloud services. 
Why is CockroachDB compatible with PostgreSQL?
Burada CockroachDB ve PostgreSQL uyumluluğu anlatılıyor

CockroachDB Mimarisi
Açıklaması şöyle
CockroachDB is implemented as a distributed key-value store over a monolithic sorted map, to make it easy for large tables and indexes to function. While CockroachDB is a distributed SQL database, developers treat it as a relational database because it uses the same SQL syntax. But on an architecture level, CockroachDB’s architecture is different from a relational database architecture. In CockroachDB, every table is ordered lexicographically by key. So, when we store the data on the database, we are leveraging the key value store.
Distributed SQL Database Özellikleri
Şeklen şöyle

1. Multi-Datacenter Clustering
Yani birden fazla  region ve datacenter'da çalışabilmesi

2. Active-Active (Peer-to-peer) vs Primary-Replica
Yani yazma işlemlerini herhangi bir düğümün yapabilmesi veya tek bir primary/master düğümün yapabilmesi. Bu açıklaması  Replication başlığı altında yazılmış ancak bence bu başlık altında olmalı. Açıklaması şöyle
Distributed systems designs also affect how you might distribute data across the different racks or datacenters you’ve deployed to. For example, given a primary-replica system, only the datacenter with the primary can serve any write workloads. Other datacenters can only serve as a read-only copy.

In a peer-to-peer system that supports multi-datacenter clustering, each node in the overall cluster can accept reads or writes. This allows for better geographic workload distribution.
3. Replication
Açıklaması şöyle. Yine kullanılan model göre yazma işlemine göre quorum seçiliyor.
Operations then can have different levels of consistency. You might have a local quorum read or write at the three node datacenter — requiring two of three nodes to be updated for local quorum. Or you might have a cluster-wide quorum, requiring any three nodes across either or both datacenters to be updated for an operation to be successful. Tunable consistency, combined with multi-datacenter topology awareness, basically gives you a lot more flexibility to customize workloads.
4. Topology Awareness
Açıklaması şöyle. Yani aynı data center içinde bile availability zone tanımlanabilmesi
.. if all your nodes were installed in the same rack, and if that rack went down, that’s no good. So topology awareness was added so that you could be rack aware within the same datacenter. This ensures you spread your data across multiple racks of that datacenter, thus minimizing outages if power or connectivity is lost to one rack or another. That’s the barest-bones form of topology awareness you’d want.



Hiç yorum yok:

Yorum Gönder