Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siddontang/rust-raftkv
A simple distributed consistent key-value store with Raft and Rust
https://github.com/siddontang/rust-raftkv
Last synced: 19 days ago
JSON representation
A simple distributed consistent key-value store with Raft and Rust
- Host: GitHub
- URL: https://github.com/siddontang/rust-raftkv
- Owner: siddontang
- License: apache-2.0
- Created: 2017-04-04T09:57:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-18T06:03:30.000Z (over 6 years ago)
- Last Synced: 2024-10-11T23:18:39.340Z (about 1 month ago)
- Language: Rust
- Size: 46.9 KB
- Stars: 31
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Raft KV
A very simple example to use [Raft](https://github.com/pingcap/raft-rs) in Rust.
## Build and Start
```bash
make# You can use goreman or other similar tools like foreman to manage the cluster
# go get github.com/mattn/goreman
goreman start
```## Usage
```bash
# Get status of a server, we can know the leader from status
curl http://127.0.0.1:20171/status# Send the request to leader
# Put abc = 124
curl http://127.0.0.1:20173/kv/abc -d 123
# Get abc
curl http://127.0.0.1:20173/kv/abc
# Delete abc
curl http://127.0.0.1:20173/kv/abc -x DELETE# Get abc locally, not through Raft
curl http://127.0.0.1:20173/local_kv/abc
```