Raft would give IO a nice way to durably store secrets.
Recently I started running IO with Podman and tested my setup by running IO instances on each node of a ten-node homelab cluster of nine Raspberry Pis and a mini PC. That got me thinking that it would be nice to share some information between my instances, particularly secrets that I might want to use to call upstream services. With appropriate database encryption, I could just use IO and drop a hard dependency on Vault.
But how can I keep my IO instances in sync? I think Raft is a good choice for that.
Pros
- Raft is a relatively simple consensus algorithm that is well-documented.
- There's a mature Go library that implements Raft, is widely used, and aligns with my ethos by having very few dependencies.
- Raft seems like it could be useful for other projects besides IO.
Cons
- Although the etcdio/raft implementation is solid, it's still not trivial to use and the examples require significant effort to understand. The official example is in the etcd repo and seems very tangled with the etcd implementation itself. (Update: it was just deleted).
- Some users will still prefer Vault or some other external secret-storage system, and that's fine. This is to make those dependencies optional.