Distributed system tools
It is generally recommended to use well-established libraries and tools to deal with consensus in distributed systems since there are many edge cases and error scenarios that can be challenging to implement and test. Fortunately, there are some open source solutions that can be used in a broad range of applications, such as microservices.
Apache Zookeeper
Apache Zookeeper is among the first widely used open source implementations of the Paxos protocol, which still powers lots of tools, including multiple versions of Apache Kafka. Written in Java and requiring Java runtime to execute, it still offers Go libraries, such as the official go-zookeeper
library: https://github.com/go-zookeeper/zk
Apache Zookeeper can be seen as a form of a distributed file system, where records (called znodes) have keys (similar to file names) and associated values. Using this data with a combination of Paxos-based consensus logic, Apache Zookeeper offers the following...