title: RAFT consensus protocol - Should entries be durable before commiting
body: <p>I have the following query about implementation RAFT:</p>
  
  <p>Consider the following scenario\implementation:</p>
  
  <ol>
  <li>RAFT leader receives a command entry, it appends the entry to an
  in-memory array It then sends the entries to followers (with the
  heartbeat) </li>
  <li>The followers receive the entry and append it to their
  in-memory array and then send a response that it has received the
  entry </li>
  <li>The leader then commits the entry by writing it to a durable
  store (file) The leader sends the latest commit index in the
  heartbeat</li>
  <li>The followers then commit the entries based on leader's
  commit index by storing the entry to their durable store (file)</li>
  </ol>
  
  <p>One of the implementations of RAFT (link: <a href="https://github.com/peterbourgon/raft/" rel="nofollow">https://github.com/peterbourgon/raft/</a>) seems to implement it this way.  I wanted to confirm if this fine.</p>
  
  <p>Is it OK  if entries are maintained "in memory" by the leader and the followers until it is committed? In what circumstances might this scenario fail?</p>