Building Raft - An Exploration of Test-Driven Development in Go Sean Klein and Advaya Krishna Carnegie Mellon University ABSTRACT Raft is a consensus algorithm developed by Diego Ongaro and John Ousterhout to be a simpler and more understandable alternative to Paxos[5]. This paper addresses that claim through a carefully designed implementation process. First, we chose Go as a language due to the effective RPC libraries that closely mirror the semantics of the algorithm presented in Ongaro and Ousterhout’s original paper. Second, we followed a process of test-driven development - our implementation is secondary to the rigorous predefined tests written in order to effectively demonstrate correctness. The versatility of the framework we built to enable these tests is reflected in the integration of our testing framework with our Raft implementation. We also discuss how generalizable it is for testing other systems that rely on RPC-based communication. We theorize that a test-driven approach implemented in Go simplifies the process of building a relatively complex system such as Raft, use an evaluation of total man hours spent to verify this claim.