4 ms·
I believe Hashicorp has an OSS GO implementation of raft if I remember correctly.
by AtNightWeCode 4y ago
I believe Hashicorp has an OSS GO implementation of raft if I remember correctly.
- eatonphil 4y agoYup! etcd [0] and hashicorp [1] have Raft libraries for Go. I've written about using the hashicorp one before [2, 3]. [0] https://pkg.go.dev/go.etcd.io/etcd/raft/v3 https://pkg.go.dev/go.etcd.io/etcd/raft/v3 [1] https://github.com/hashicorp/raft https://github.com/hashicorp/raft [2] https://notes.eatonphil.com/distributed-postgres.html https://notes.eatonphil.com/distributed-postgres.html [3] https://notes.eatonphil.com/minimal-key-value-store-with-hashicorp-raft.html https://notes.eatonphil.com/minimal-key-value-store-with-has...
- candiddevmike 4y agoWhy did you pick HC raft over etcd?
- eatonphil 4y agoThe Hashicorp one came up first in a google search months ago. So, basically no reason.
- asadawadia 4y agolove it
- didip 4y agoIMHO, the code is easier to follow than etcd's.
- skyde 4y agoyes it’s more modular with clear contract between the parts
- withinboredom 4y agoEtcd will spam your logs on quorum loss. It can easily fill your disk before the node comes back online or you wake up to fix it. Etcd logging is playing with fire. Just be careful.
- eatonphil 4y agoTo defend etcd's implementation though, it is what cockroachdb uses. https://github.com/cockroachdb/cockroach/blob/master/go.mod#L155 https://github.com/cockroachdb/cockroach/blob/master/go.mod#...