Parv Agrawal的动态

查看Parv Agrawal的档案

Software Engineer at D.E. Shaw | IIT Delhi EE

Raft is a distributed consensus algorithm. Here is a simple way to understand what problem such algorithms and Raft in particular solves: Since it’s already summer, imagine there is an ice-cream delivery server which manages order info of various customers. There are many reasons the ice-cream company may want to run multiple instances of this server, one of them being availability i.e. even if one crashes, you can still order your ice-cream. But once we have multiple instances, consistency can take a hit. What if when your ice-cream is about to be dispatched, one server says you asked for mango flavor, but another says you asked for orange! (Maybe in reality, you asked for orange, but later changed to mango and the second server is just lagging) This is what distributed (i.e. multiple ice cream servers) consensus (i.e agree on the same flavor) is. One popular way to solve this problem is with a leader-follower server approach i.e. for consistency (strong, not eventual) one can always query the leader which is supposed to have the most updated state. In the background, the leader replicates its state to all the followers, so that one of them can become leader in case the current leader crashes. Raft, among other things, provides a leader election algorithm. Interesting thing about Raft is that it was designed for “understandability” as a metric. The consensus algorithm before Raft, “Paxos” , was notoriously difficult to understand, limiting the number of its practical implementations and rate of improvement. I am trying to understand the Raft algorithm myself, and wouldn’t attempt simplifying its details just yet. In case this sounds interesting to you, you may want to check out the original Raft paper linked in comments! #programming?#softwareengineering?#computerscience?#computernetworks?#Database?#DistributedSystems #Raft

Parv Agrawal

Software Engineer at D.E. Shaw | IIT Delhi EE

11 个月
回复

要查看或添加评论,请登录