Graph
Distributed Database

🌐Distributed Database

NEW

A database whose data and processing are spread across multiple machines to improve scalability, fault tolerance, and locality.

DESCRIPTION

A distributed database partitions and/or replicates data across nodes, coordinating queries, transactions, and consistency among replicas. Architectures vary from shared-nothing clusters to globally distributed systems with consensus protocols. Trade-offs follow the CAP theorem and consistency models such as strong, eventual, or causal consistency. Examples include Google Spanner, CockroachDB, Cassandra, and MongoDB sharded clusters. Distributed design enhances resilience and performance but introduces complexity in consensus, replication, and failure handling.

ALTERNATIVE DEFINITIONS

Wikipedia

A distributed database is a database in which data is stored across several physical locations.

Highlights distribution of data across multiple physical sites.

Source

Google Research

Spanner: Google’s scalable, multi-version, globally-distributed, and synchronously-replicated database.

Emphasizes synchronous replication and global distribution in a reference system.

Source

Sharding Replication Consensus CAP Theorem Consistency Partition Tolerance Leader Election Two-Phase Commit NewSQL NoSQL

COMPETING TERMS

Centralized Database Single-node Database

RELATIONS

KNOWLEDGE AREAS

Data Architecture Data Storage & Operations Cloud Infrastructure

TARGET AUDIENCE

Data Architect Cloud Architect Data Engineer DevOps Engineer Software Developer

EXTERNAL SOURCES

TOP QUESTIONS

Why use a Distributed Database?

It provides horizontal scalability, resilience to failures, and data locality, supporting high throughput and global applications.

Category: Relevancy

What are typical Distributed Database architectures?

Shared-nothing clusters, master-follower replication, multi-leader replication, and consensus-based systems like Raft or Paxos.

Category: Architecture

How does CAP Theorem relate to Distributed Databases?

It describes trade-offs among Consistency, Availability, and Partition Tolerance during network failures and design choices.

Category: Concepts

What are common mistakes in Distributed Databases?

Ignoring failure modes, choosing inappropriate consistency models, and poor data partitioning can cause hotspots and outages.

Category: Mistakes

What is the biggest risk in Distributed Databases?

Complex failure handling and split-brain scenarios can lead to data inconsistency or unavailability without robust consensus and monitoring.

Category: Risk

How do Distributed Databases handle transactions?

They may use two-phase commit, per-shard transactions, or global serializable transactions depending on design and consistency goals.

Category: Mechanism

What is sharding in Distributed Databases?

Sharding splits data into partitions across nodes to balance load and scale horizontally.

Category: Concepts

When is eventual consistency acceptable?

In high-availability systems where temporary read inconsistencies are tolerable, such as social feeds or caching layers.

Category: Guidance

How to start building on a Distributed Database?

Choose a system matching consistency and scalability needs, define partitioning keys, and implement observability and chaos testing.

Category: GettingStarted