dadgar/onecache

Replication clarifications

JensRantil opened this issue · 2 comments

The readme briefly states onecache supports replication. Is there a replication factor configurable somewhere? Is replication done on shutdown of a node? Is a node handed data on startup?

Hey,

The replication factor is configurable. It is settable in the config and via the cli with the -replicas flag

Each node is responsible for a certain key space. All writes/reads are forwarded to the leader of a given key space. When a key is dirtied this causes a background replication to the configured number of replicas. When a node joins, leaders will replicate the data it should have to it.

Hi,
Even in case of increasing this value by either -replicas flag or in the config directly, only one peer is being created.

  1. is this intentional ?
  2. am I misunderstanding replicas with peers ?

Thanks !