A distributed systems laboratory

See a key move through a real cluster.

Shardis is a distributed key-value store built from scratch to make sharding, replication, and failover visible instead of mysterious.

01Write a keyWatch the leader accept it.
02Watch replicationSee the follower catch up.
03Break the leaderObserve failover and recovery.
Try this now

Four steps, one distributed write

  1. 1Write a key below - it's auto-routed to the right shard's leader.
  2. 2Watch it replicate to the follower in the node table.
  3. 3Watch the console history explain each response in plain English.
  4. 4Kill a leader in the terminal and watch failover happen.

This page shows a live cluster. Leader failover (killing a node and watching a follower take over) happens in the terminal against a local or Docker cluster - see the README for the exact commands.

Live cluster

Health, ownership, replication, and events from the nodes running now.
Waking free demo
The free Render demo is waking up.Shardis is retrying both nodes automatically. Render cold starts can take about a minute; no refresh is needed.

Hash ring

shard-ashard-bshard-c16384 slots3 shards
shard-a[0-5460]no leader visible
shard-b[5461-10922]no leader visible
shard-c[10923-16383]no leader visible

Nodes

NodeShardRoleUptimeKeysEvictionsOpsPeersRepl. lag
node-a1shard-adown------
node-a2shard-adown------
node-b1shard-bdown------
node-b2shard-bdown------
node-c1shard-cdown------
node-c2shard-cdown------

Console

Keys are hashed to their shard and routed to a reachable leader automatically. Public-demo writes also need the write_key above, remembered only in this browser.

Live event feed

Waiting for events... make a write against the cluster to see one land here.