Consensus protocols are used to provide consistency guarantees over replicated data in a distributed system, and allow a set of replicas to work together as a coherent group. Raft is a consensus protocol that is designed to be easy to understand and implement. It is equivalent to Paxos in fault-tolerance and performance and uses leader based approach for coordinating replication to a majority. All reads and writes go through the leader to ensure strong consistency. However, in case of read heavy workloads it increases the load on the leader whereas the followers act as just cold standbys. A natural question arises: Can we utilize the cluster more efficiently to reduce the contention at the leader and improve the overall throughput?
CockroachDB is an open source distributed database which uses Raft for replication. We use it to integrate and test our hypothesis. This talk will start with a brief introduction of Raft and CockroachDB. Then it will cover quorum read approaches in order to serve consistent reads without a leader. The design and implementation of the same in reference to CockroachDB will be explained. It will conclude with some YCSB benchmark results in order to analyze performance improvements.