Rebalancing Traffic In Leaderless Distributed Architecture
I am trying to create in-memory distributed store similar to cassandra. I am doing it in go. I have concept of storage_node with get_by_key and put_key_value. When a new node starts it starts gossip with seed node and then gossip with rest of the nodes in cluster. This allows it to find all other nodes. Any node in the cluster can handle traffic. When a node receives request it identifies the owner node and redirects the request to that node. At present, when node is added to the cluster it immediately take the ownership of the data it is responsible for. It serves read and write traffic. Writes can be handled but reads return null/none because the key is stored in previous owner node. How can I solve this challenge.? Ideally I am looking for replication strategies. such that when new node is added to the cluster it first replicates the data and then starts to serve the traffic. In the hind-sight it looks easy but I am thinking how to handle mutation/inserts when the data is being repl
Continue reading on Reddit Programming
Opens in a new tab

.png&w=1200&q=75)