DKV is a distributed key value store server written in Go. It exposes all its functionality over gRPC & Protocol Buffers.
- Data Sharding
- Tunable consistency
- Data replication over WANs
- Put(
Key
,Value
) - MultiPut(
[]{Key, Value}
) - Get(
Key
,Consistency
) - MultiGet(
[]Keys
,Consistency
) - Delete(
[]Keys
) - CompareAndSet(
Key
,Value
,OldValue
) - Scan(
KeyPrefix
,StartKey
)
- Go version 1.16+
- RocksDB v6.22.1 as a storage engine
- GoRocksDB provides the CGo bindings with RocksDB
- Badger v1.6 as a storage engine
- Nexus for sync replication over Raft consensus
A single DKV instance can be launched using the following docker command:
docker run -it -p 8080:8080 ghcr.io/flipkart-incubator/dkv:latest dkvsrv
or while using native binaries using :
$ ./bin/dkvsrv --config dkvsrv.yaml --db-folder <folder_name> --listen-addr <host:port>
Any operations can be done using the dkvctl cli, or using the clients:
$ ./bin/dkvctl -a <host:port> --set <key> <value>
$ ./bin/dkvctl -a <host:port> --get <key>
Example session:
$ ./bin/dkvsrv --config dkvsrv.yaml --db-folder /tmp/db --listen-addr 127.0.0.1:8080
$ ./bin/dkvctl -a 127.0.0.1:8080 --set foo bar
$ ./bin/dkvctl -a 127.0.0.1:8080 --get foo
bar
$ ./bin/dkvctl -a 127.0.0.1:8080 --set hello world
$ ./bin/dkvctl -a 127.0.0.1:8080 --get hello
world
$ ./bin/dkvctl -a 127.0.0.1:8080 --del foo
$ ./bin/dkvctl -a 127.0.0.1:8080 --iter "*"
hello => world
Please refer to the wiki instructions on how to run DKV in cluster mode.
Detailed documentation on specific features, design principles, data guarantees etc. can be found in the dkv Wiki
dkv is undergoing active development. Consider joining the dkv-interest Google group for updates, design discussions, roadmap etc. in the initial stages of this project.