hanj4096 / raftdb Goto Github PK
View Code? Open in Web Editor NEWA simple distributed key value store based on the Raft consensus protocol
License: MIT License
A simple distributed key value store based on the Raft consensus protocol
License: MIT License
When I close the leader's terminal, the followers' terminals are also closed.
`$GOPATH/bin/raftd -id node03 -haddr raft-cluster-host-03:8091 -raddr raft-cluster-host-03:8089 -join raft-cluster-host-01:8091 ~/.raftdb
2022-06-17T14:28:19.959+0800 [INFO] raft: initial configuration: index=1 servers="[{Suffrage:Voter ID:node01 Address:127.0.0.2:8089}]"
[store] 2022/06/17 14:28:19 no bootstrap needed
2022-06-17T14:28:19.959+0800 [INFO] raft: entering follower state: follower="Node at 127.0.0.4:8089 [Follower]" leader=
2022/06/17 14:28:19 failed to join node at raft-cluster-host-01:8091: Post "http://raft-cluster-host-01:8091/join": dial tcp 127.0.0.2:8091: connect: connection refused
`
I don't know if there is something wrong with my operation. If this part is implemented, what should I do?
Thank you very much!
Unit test fails when executing go test -v ./...
.
If raftdb is used as a learning example, it will be better for students to fix the unit tests. While the source copy hraftd of raftdb is a good example
When sending a "get" request to a follower, the follower refuses to connect:
`curl -X GET raft-cluster-host-02:8091/key/foo -L
curl: (7) Failed to connect to raft-cluster-host-02 port 8091: 拒绝连接`
It would be better to note that raftdb is inspired by https://github.com/otoolep/hraftd or forked from https://github.com/otoolep/hraftd
After all, based on https://github.com/otoolep/hraftd, there are not many code modifications in raftdb.
store.Join
maybe return raft.ErrNotLeader
, so store.ErrNotLeader
shouldn't be used, and all store.ErrNotLeader
should be replaced with raft.ErrNotLeader
Lines 133 to 136 in d69b747
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.