I’m CS student.
I’m currently trying to make distributed key-value store.
Since I’m new to distributed system concept.
I’m struggling with sort of concrete implementation and methodology to apply distributed system concept to key value store.
I’ve decided to use raft algorithm as my key-value store’s consensus algorithm.
As far as I know, raft-algorithm has leader,follower,candidate.
every specified interval, leader refreshes and synchronizes other nodes with up-to-date data.
My question is, If leader node is in charge of handling every write request(write requested data to key-value store and propagate the data to other nodes)or not. In case, leader takes overall responsible to write request, it looks really unreasonable to me.
I read many distributed RDBMS,K-V store’s architecture overview and user guide to know How they are doing this.
But none of them mentioned about my questions. I really struggled to answer to the questions myself!.. But I failed to make it.
As a last resort, I’m asking to stackoverflow users. my questions are
1. Does leader takes overall responsible for handling every write or read requests from clients?
If so, Should i redirect every requests to leader node?
2.raft-algorithm’s node(leader,candidate,follower) corresponds with node in node concept in key-value store?
Glossary of CockRoachDB says
Node is an individual machine running CockroachDB. Many nodes join together to create your cluster.
3.How often should distributed system synchronizes? Should it synchronize for every write transaction?
I know some of my questions(maybe all question) are dumb. Since I’m really eager to learn distributed system. It would be very glad to me if you let me know what i’m currently understanding distributed system incorrectly.
I really appreciate your answer and I want to apologize for my poor english in advance.