-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raft client reference implementation #394
Comments
@inge4pres It seems rqlite is using HTTP and HTTP redirection (to forward its requests to the leader) |
Hello @xuyang2 thanks for the references 😄 If yes it would be great to have a reference implementation that can be used as part of the library here to build not only the server but also the client. |
Hey there, |
This is still valid IMO, checked the docs and still no sign of the reference implementation |
That is an internal method and having clients call it is going to break your cluster. I wrote some example code: https://github.com/Jille/raft-grpc-example - it includes a server and client. It uses https://github.com/Jille/raft-grpc-leader-rpc to allow you to easily send RPCs to your leader. Clients connect to all Raft nodes and use health checks to figure out who the leader is. Add in some retries and you don't have to think about it anymore :) |
Hello 😄
This is kind of related to #128, I have been working on an implementation of a cluster using this library and I'm now facing a difficulty: there is nowhere an example or an explanation of how to connect remotely to a cluster (either to the Leader or Follower) and send commands to it.
It should be possible, since the cluster members are talking to each other with Transport, but it's not so immediate to build.
Would it be ok to have an
RPCClient
reference implementation or some documentation on how to connect and send commands to a running Raft cluster?I dug up a bit into Consul codebase ad could not really find it...
Thank you
The text was updated successfully, but these errors were encountered: