Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_consistent-hashing-ring

Consistent Hashing Ring (virtual nodes and rebalancing)

10 COMPONENTS · 8 FLOWS · UPDATED 2026-11-20
GITHUB README / PR PREVIEW CARD
[![Consistent Hashing Ring (virtual nodes and rebalancing) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_consistent-hashing-ring/opengraph-image)](https://archos.sageideas.dev/d/dgm_consistent-hashing-ring)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_consistent-hashing-ring)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_consistent-hashing-ring" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Consistent Hashing Ring (virtual nodes and rebalancing) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("Application Service")]
  operator_1[("Platform Operator")]
  router_2["Shard router"]
  sa_3[("Cassandra node")]
  sb_4[("Cassandra node")]
  sc_5[("Cassandra node")]
  sd_6[("Cassandra node")]
  reb_7["Partition rebalancing"]
  metrics_8[("Traces, metrics and logs")]
  capacity_9["Capacity card"]
  client_0 -->|"1. Sends a write with a JWT · HTTPS"| router_2
  router_2 -->|"2. Writes to the owner · TCP"| sb_4
  sb_4 -->|"3a. Acks the write · TCP"| router_2
  sb_4 -->|"3b. Copies the write · TCP"| sc_5
  router_2 -->|"4. Returns the ack · HTTPS"| client_0
  operator_1 -->|"Adds server D with a JWT · HTTPS"| reb_7
  reb_7 -->|"Streams slices from A, B, C · TCP"| sd_6
  sa_3 -->|"Exports (OTLP) · OTLP"| metrics_8

COMPONENT STACK (10)

  • Application ServiceSTATEFUL
    Reads and writes values by key
  • Platform OperatorSTATEFUL
    Adds or removes servers
  • Shard routerSTATELESS
    Checks the JWT, finds the key's token, picks the owner
  • Cassandra nodeSTATEFUL
    Server A: virtual nodes at 12, 47 and 90
  • Cassandra nodeSTATEFUL
    Server B: virtual nodes at 25, 63 and 98
  • Cassandra nodeSTATEFUL
    Server C: virtual nodes at 5, 38 and 77
  • Cassandra nodeSTATEFUL
    Server D joins with virtual nodes at 8, 30 and 55
  • Partition rebalancingSTATELESS
    Streams only the slices the new server takes over
  • Traces, metrics and logsSTATEFUL
    Request rate and key count per server
  • Capacity cardSTATELESS
    Sizing for 10 servers; the ring drawn is a 3-server toy

REQUEST & DATA FLOW (8)

  1. Application Service → Shard router (Sends a write with a JWT)[HTTPS]
  2. Shard router → Cassandra node (Writes to the owner)[TCP]
  3. Cassandra node → Shard router (Acks the write)[TCP]
  4. Cassandra node → Cassandra node (Copies the write)[TCP]
  5. Shard router → Application Service (Returns the ack)[HTTPS]
  6. Platform Operator → Partition rebalancing (Adds server D with a JWT)[HTTPS]
  7. Partition rebalancing → Cassandra node (Streams slices from A, B, C)[TCP]
  8. Cassandra node → Traces, metrics and logs (Exports (OTLP))[OTLP]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →