https://github.com/rocketbitz/raft-hyperleveldb
Raft backend using InfluxData's HyperLevelDB
https://github.com/rocketbitz/raft-hyperleveldb
Last synced: 5 months ago
JSON representation
Raft backend using InfluxData's HyperLevelDB
- Host: GitHub
- URL: https://github.com/rocketbitz/raft-hyperleveldb
- Owner: rocketbitz
- License: apache-2.0
- Created: 2018-08-17T18:34:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T20:12:59.000Z (almost 8 years ago)
- Last Synced: 2025-12-17T15:05:05.546Z (6 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# raft-hyperleveldb
Raft backend using HyperDex's HyperLevelDB
## Use Case
Drop it in instead of BoltDB if your workload is highly concurrent and write intensive. See their [writeup](http://hyperdex.org/performance/leveldb/) for more details
## Example
```go
logStore, _ := rafthyperleveldb.NewHyperLevelDBStore("/path/to/raft/db", rafthyperleveldb.High)
myRaft, _ := raft.NewRaft(config, (*fsm)(c), logStore, logStore, snapshots, transport)
```
## Benchmark
HyperLevelDB:
```
BenchmarkHyperLevelDBStore_FirstIndex-8 1000000 1031 ns/op
BenchmarkHyperLevelDBStore_LastIndex-8 1000000 1477 ns/op
BenchmarkHyperLevelDBStore_GetLog-8 2000000 935 ns/op
BenchmarkHyperLevelDBStore_StoreLog-8 200000 9662 ns/op
BenchmarkHyperLevelDBStore_StoreLogs-8 100000 17323 ns/op
BenchmarkHyperLevelDBStore_DeleteRange-8 100000 19645 ns/op
BenchmarkHyperLevelDBStore_Set-8 200000 9936 ns/op
BenchmarkHyperLevelDBStore_Get-8 2000000 795 ns/op
BenchmarkHyperLevelDBStore_SetUint64-8 200000 9086 ns/op
BenchmarkHyperLevelDBStore_GetUint64-8 2000000 856 ns/op
```
## Remarks
Credit to https://github.com/tidwall/raft-leveldb for the original raft-leveldb