Implementation of Raft consensus algorithm