SysPadExamples › Distributed key-value store

Distributed key-value store

A coordinator implements quorum reads/writes (W+R>N) against Keyspaces - the consistent-hashing ring, gossip membership, and vector clocks are internal to the managed Cassandra-compatible store. A scheduled anti-entropy worker reconciles divergent replicas.

The ring abstracted into one managed component, a coordinator layer for quorum logic, a hot-key cache, and Merkle-tree anti-entropy as a background job.

Client Users DNS Route 53 Load Balancer ALB Coordinator Fargate Hot-Key Cache ElastiCache Distributed Ring (K… Keyspaces Anti-Entropy Schedu… EB Scheduler Read-Repair Worker Lambda

How it works

Hot-Key Cache
Read-through for skewed hot keys. A read tries here first; a write invalidates the entry so the next read repopulates from the ring.
Distributed Ring (Keyspaces)
The consistent-hashing ring: gossip membership, vector clocks, replication, hinted handoff, and read-repair all live INSIDE the managed Cassandra-compatible store. The coordinator only chooses replicas and counts W/R acks.
Read-Repair Worker
Periodic Merkle-tree anti-entropy: compares replica trees and reconciles keys that gossip and read-repair missed. Off the request path, so it never adds read/write latency.

Request flows

Get (quorum read)

  1. Client
  2. DNS
  3. Load Balancer
  4. Coordinator
  5. Hot-Key Cache
  6. Distributed Ring (Keyspaces)

Put (quorum write)

  1. Client
  2. DNS
  3. Load Balancer
  4. Coordinator
  5. Distributed Ring (Keyspaces)
  6. Hot-Key Cache

Anti-entropy repair

  1. Anti-Entropy Schedule
  2. Read-Repair Worker
  3. Distributed Ring (Keyspaces)

Other interview practice

Open this architecture in SysPad · All examples