🪟 Windows TippsUnable to install Docker Desktop on Windows 11(05.09.2026 um 05:19 Uhr)
🪟 Windows TippsIn dieser Woche kam das Aus für die ‘Deutsche Post’(05.09.2026 um 09:00 Uhr)
🔧 AI Nachrichten GenAI Workflows für Social Media Content(02.09.2026 um 14:00 Uhr)
🪟 Windows Tipps<b>Windows</b> - IT-Administrator.de(04.09.2026 um 04:17 Uhr)
🪟 Windows TippsUnable to install Docker Desktop on Windows 11(05.09.2026 um 05:19 Uhr)
🪟 Windows TippsIn dieser Woche kam das Aus für die ‘Deutsche Post’(05.09.2026 um 09:00 Uhr)
🔧 AI Nachrichten GenAI Workflows für Social Media Content(02.09.2026 um 14:00 Uhr)
🪟 Windows Tipps<b>Windows</b> - IT-Administrator.de(04.09.2026 um 04:17 Uhr)

26 🕛 kürzlich 6 Min Lesezeit
0

Design a Distributed Key-Value Store

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Key-Value Stores: Design and Architecture



A key-value store is a non-relational database that maps unique keys to values. Keys must be unique, and each key maps directly to a value — typically a string or object.





When a partition occurs, you must choose:





Naive consistent hashing creates two problems: uneven key distribution and unequal partition sizes. Virtual nodes solve this — each physical server occupies multiple positions on the ring, smoothing out distribution proportionally to each server's capacity.



Key benefits of partitioning: automatic scaling, higher storage capacity, improved data locality, and heterogeneous server support.









Data Replication



Partitioning spreads data but doesn't protect it. Replication does — by storing copies of each key across N distinct nodes, ideally across separate data centers to guard against localized failures like power outages.






























Configuration Effect
R = 1, W = N Optimized for fast reads
W = 1, R = N Optimized for fast writes
W + R > N Strong consistency guaranteed (e.g. N=3, W=R=2)
W + R ≤ N Strong consistency not guaranteed


The key insight behind W + R > N: any read set and any write set must overlap, so at least one node always has the latest data.






Sloppy Quorum



Standard quorum can still return stale data. If a write lands on node s1 but a subsequent read hits s2, the client sees stale data — since reads and writes are load-balanced, you can't control which nodes they hit.



Sloppy quorum addresses this. Rather than requiring acknowledgement from a strict set of N nodes, it allows any available nodes in the cluster to temporarily handle requests when the designated nodes are unavailable. This keeps the system responsive during partial failures while still satisfying the W + R > N invariant once the cluster stabilizes.



For a 3-node cluster with W = R = 2, a majority of nodes must acknowledge every read and write. This guarantees that the read and write sets always overlap — so at least one node in any read quorum will always have the latest data.









Inconsistency Resolution



Even with quorum, replicas can diverge. Versioning handles this: each write increments a version number, and on subsequent writes clients must first fetch the latest version before incrementing and writing. Readers resolve conflicts by comparing versions and discarding stale data.





Each node maintains a membership list with heartbeat counters. Nodes periodically increment their counters and share them with random peers. If a node's heartbeat stops incrementing past a defined threshold, it's marked offline.





Core design principles:




  • Clients interact via get(key) and put(key, value)

  • A coordinator node acts as a proxy between the client and the cluster

  • Nodes are distributed on a consistent hashing ring

  • The system is fully decentralized — no single point of failure

  • Every node is symmetric, handling the same set of responsibilities






  1. Write is appended to a commit log (durability)

  2. Data is written to an in-memory cache

  3. When the cache exceeds a threshold, it flushes to an SSTable on disk









Read Path






  1. Check the in-memory cache — on a miss, proceed

  2. Consult the Bloom filter to identify which SSTables likely contain the key

  3. Query the relevant SSTables and return the result to the client









Summary



Summary table
















































Component Purpose
Consistent hashing Distribute keys evenly across nodes
Virtual nodes Fix uneven distribution in consistent hashing
Replication Prevent data loss; ensure availability
Quorum (W + R > N) Balance consistency and availability
Versioning Resolve conflicts between replicas
Gossip protocol Decentralized failure detection
Hinted handoff Handle temporary node failures
Merkle trees Efficient sync after permanent failures
Bloom filters Fast disk lookups on the read path
Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 48%
🟡 In Evaluierung 24%
🟢 Keine Auswirkung 15%
Spannende Innovation 13%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Unable to install Docker Desktop on Windows 11
1 Quelle
There is no volume selected in Diskpart error on Windows computer [Fix]
1 Quelle
'Call of Duty: Modern Warfare 2' PC remote code exploits have been fixed, says Activision
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Design a Distributed Key-Value Store

Thematisch verwandte Begriffe: Design, Distributed, KeyValue, Store · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...