These are chat archives for atomix/atomix
DistributedGroupmeans you can use it to e.g. create a linearly scalable map.
DistributedGroupis set up, you could have e.g. a 3 node cluster with 3 partitions and a replication factor of 2. That would mean each partition has two nodes. Partition
1is assigned to nodes
C, and partition
A. It won’t necessarily work out that, but if you’re using a good hashing algorithm and virtual nodes it will get close.
Care placed in a logical ring (a data structure that wraps around -
TreeMapin Atomix). Then, you hash a partition to a point on that ring. So, if partition
1falls right before node
Aon the ring, and the replication factor is
2, then it will be assigned to nodes
Bsince those are the next two nodes in the ring. So, when you add a node to the ring, all that happens is the partitions closes to the node being added need to be moved around, and the others stay in the same place. So, if you add a node
C, then partition
3will be assigned to nodes
A. Thus, you’ll move a partition from node
Dwhen it joins. In the opposite direction, if node
Cis instead removed, then partition
3will map to nodes
B. Because partition
3was mapped to nodes
Cleft, we can copy the partition from the remaining replica node
B. Does that make sense?