You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 month ago | |
---|---|---|
cmd/pawg5 | 1 month ago | |
server | 1 month ago | |
.gitignore | 1 month ago | |
LICENSE | 1 month ago | |
LICENSE.old | 5 years ago | |
LICENSE.prologic | 1 month ago | |
README.md | 1 month ago | |
go.mod | 1 month ago | |
go.sum | 1 month ago |
README.md
pawg5
a P.A.W.G rub pogreb distributed key/value store
using raft for concensus with a
redis compatible API
based off of kvnode and bitraft (See LICENSE.old and LICENSE.prologic)
- redis compatible API
- pogreb disk-based storage
- Raft support with finn commands
- compatible with existing Redis clients (probably?)
works like you'd expect prolly
SET key value
GET key
DEL key [key ...]
KEYS pattern
FLUSHDB
SHUTDOWN
back that (p)hat (a)ss [up] (w)hite (g)irl, [on] (5)
RAFTSNAPSHOT
this will creates a new snapshot in the data/snapshots
directory.
Each snapshot contains two files, meta.json
and state.bin
.
the state file is the database in a compressed format.
The meta file is details about the state including the term, index, crc, and size.
ideally you call RAFTSNAPSHOT
and then store the state.bin on some other server like S3.
To restore:
- create a new raft cluster
- download the state.bin snapshot
- pipe the commands using the
pawg5 --parse-snapshot
andredis-cli --pipe
commands
Example:
pawg5 --parse-snapshot state.bin | redis-cli -h 10.0.1.5 -p 4920 --pipe
this will execute all of the state.bin
commands on the leader at 10.0.1.5:4920
for information on the redis-cli --pipe
command see Redis Mass Insert.