Distributed, multi-tenant key-value and object store in Rust, with Raft consensus, WAL durability, and production-oriented operations.
Rust
404
267 commits
updated Sep 29, 2026
Distributed key-value and object store in Rust, with Raft-replicated metadata, two-phase commit to the volume servers, and write-ahead logs.
v2.0.1 is a correction release. Where 2.0.0 reported work that it did not do, minikv now fails explicitly:
501 Not Implemented, and the matching CLI commands exit with status 1. See Operations./metrics follows the Prometheus text format and only exports what minikv measures.See the CHANGELOG, and its correction note on earlier entries.
v2.0.0 reworks the distributed layer.
The v1.0.0 time-series API, vector search and Python SDK are unchanged. The Helm chart does not start a working cluster (see Operations and Release Engineering).
minikv is a distributed systems reference implementation and an extensible data platform.
A cluster has two kinds of nodes: coordinators, which form a Raft group and hold the metadata, and volume servers, which hold the bytes. Each volume server sends a heartbeat to every coordinator listed in --coordinators.
A write (PUT) goes through the leader:
A read (GET) works on any coordinator:
If the leader goes down, the remaining coordinators elect a new one within about a second. A follower answers writes with 503 and an x-minikv-leader header that names the leader.
Each key is stored on the replicas live volumes that rank highest for it. The weight of a volume is the first 8 bytes of BLAKE3(key followed by the volume id), read as a little-endian integer; on a tie, the smaller volume id wins. The choice depends only on the key and on the set of live volumes, not on their order. When fewer volumes are live than replicas, the write goes to all of them, and the leader logs a warning. Reads do not recompute the placement: they use the replicas recorded in the key's metadata.
There are no shards: the num_shards setting is reserved for the virtual shards planned for v2.2.0.
Build and run a local cluster of 3 coordinators and 3 volumes:
git clone https://github.com/whispem/minikv.git
cd minikv
make build
make serve
On macOS, port 5000 is taken by the AirPlay Receiver. Turn it off in System Settings › General › AirDrop & Handoff before running make serve.
Basic checks:
curl -s http://127.0.0.1:5000/health/live
curl -s http://127.0.0.1:5000/health/ready
curl -s http://127.0.0.1:5000/metrics
curl -s http://127.0.0.1:5000/admin/status
Store an object, then read it from the other coordinators. The coordinators listen on ports 5000, 5002 and 5004. Writes go to the leader: if coordinator 1 is not the leader, the PUT answers 503 and the x-minikv-leader header tells you which one is.
curl -X PUT --data-binary "hello" http://127.0.0.1:5000/s3/demo/hello.txt
curl http://127.0.0.1:5002/s3/demo/hello.txt
curl http://127.0.0.1:5004/s3/demo/hello.txt
Notebook-first SDK (preview) for data scientists and engineers:
Install and run example:
pip install -r sdk/python/requirements.txt
python examples/data_science_quickstart.py
Files:
sdk/python/minikv_client.pysdk/python/README.mdexamples/data_science_quickstart.pyDistribution and consistency:
Storage and query paths:
Security and tenancy building blocks:
These modules are implemented and tested on their own. Enforcing them on the HTTP API is planned for v2.1.0. The audit log already records the admin operations, with the actor unauthenticated.
Library modules that nothing in minikv uses yet: cross-datacenter replication, change data capture, data tiering, geo routing, plugins, the Kubernetes operator types and io_uring. Where one of them would report work that it does not do, it fails with a "not implemented" error.
APIs:
Writes, reads and deletes, the S3-compatible routes, batch and range, leader failover, volume heartbeats, /health/live, /health/ready, /admin/status and /metrics work.
The routes below are not implemented. They answer 501 Not Implemented with a JSON body that names the feature and the release planned for it, for example {"error":"not implemented","feature":"verify","roadmap":"2.1.0"}:
| Route | Feature | Planned for |
|---|---|---|
POST /admin/verify | verify | 2.1.0 |
POST /admin/repair | repair | 2.2.0 |
POST /admin/compact | compact | 2.2.0 |
POST /admin/scale | scale | 2.2.0 |
POST /admin/backup, GET /admin/backups, GET and DELETE /admin/backups/:id | backup | unscheduled |
POST /admin/restore | restore | unscheduled |
PUT /s3/:bucket/:key, PUT /:key and POST /:key with an X-Minikv-TTL header | ttl | unscheduled |
unscheduled means that no release plans the feature yet. A write with an X-Minikv-TTL header stores nothing.
The minikv CLI exits with:
0 on success;1 on failure: when the coordinator answers an error to get, put or delete, and always for verify, repair, compact, rebalance, upgrade and stream, which are not implemented. The message goes to standard error, for example error: verify is not implemented (roadmap: 2.1.0);2 when the arguments are invalid.Observability:
/metrics (text format 0.0.4): live volumes, keys and bytes per volume, Raft role, term and commit index, uptimeopentelemetry/prometheus-alerts.yml: no healthy volume for 2 minutesKubernetes:
k8s/helm/minikv/ does not start a working cluster: its templates pass none of the settings that the images need. See its README.k8s/operator/, k8s/rbac/, k8s/crds/ and k8s/examples/ are for a Kubernetes operator that minikv does not have.Runbooks:
docs/ops-backup-restore.md, for when backups exist: they are not implementeddocs/release-engineering-v2.0.0.mdPreflight commands:
make release-preflight
make release-preflight-full
v2.1.0:
verify)v2.2.0:
repair)compact)scale)rebalance)Future:
make build
make test
make fmt
make clippy
End-to-end cluster test (3 coordinators, 3 volumes, leader failover):
cargo test --release --test distributed_cluster -- --nocapture
Two of the time-series integration tests expect a coordinator on port 8000, as in CI:
cargo run --release --bin minikv-coord -- serve --id 1
Project layout:
src/
bin/ # minikv, minikv-coord, minikv-volume
common/ # auth, backup, cdc, metrics, replication, timeseries, ...
coordinator/ # Raft, metadata, placement, HTTP/gRPC APIs
volume/ # volume node storage and APIs
ops/ # cluster operations, not implemented yet: each one returns an error
k8s/ # Helm chart and operator manifests, neither of which works yet
opentelemetry/ # Prometheus, Grafana and Jaeger containers (minikv exports no traces)
sdk/python/ # notebook-first Python client preview
docs/ # runbooks and release engineering docs
Contributions are welcome. See CONTRIBUTING.md for coding, testing, and PR workflow.
MIT. See LICENSE.
481 followers · starred Jan 2026
157 followers · starred Feb 2026
516 followers · starred Jan 2026
728 followers · starred Mar 2026
Distributed, multi-tenant key-value and object store in Rust, with Raft consensus, WAL durability, and production-oriented operations.
Rust
404
267 commits
updated Sep 29, 2026
Distributed key-value and object store in Rust, with Raft-replicated metadata, two-phase commit to the volume servers, and write-ahead logs.
v2.0.1 is a correction release. Where 2.0.0 reported work that it did not do, minikv now fails explicitly:
501 Not Implemented, and the matching CLI commands exit with status 1. See Operations./metrics follows the Prometheus text format and only exports what minikv measures.See the CHANGELOG, and its correction note on earlier entries.
v2.0.0 reworks the distributed layer.
The v1.0.0 time-series API, vector search and Python SDK are unchanged. The Helm chart does not start a working cluster (see Operations and Release Engineering).
minikv is a distributed systems reference implementation and an extensible data platform.
A cluster has two kinds of nodes: coordinators, which form a Raft group and hold the metadata, and volume servers, which hold the bytes. Each volume server sends a heartbeat to every coordinator listed in --coordinators.
A write (PUT) goes through the leader:
A read (GET) works on any coordinator:
If the leader goes down, the remaining coordinators elect a new one within about a second. A follower answers writes with 503 and an x-minikv-leader header that names the leader.
Each key is stored on the replicas live volumes that rank highest for it. The weight of a volume is the first 8 bytes of BLAKE3(key followed by the volume id), read as a little-endian integer; on a tie, the smaller volume id wins. The choice depends only on the key and on the set of live volumes, not on their order. When fewer volumes are live than replicas, the write goes to all of them, and the leader logs a warning. Reads do not recompute the placement: they use the replicas recorded in the key's metadata.
There are no shards: the num_shards setting is reserved for the virtual shards planned for v2.2.0.
Build and run a local cluster of 3 coordinators and 3 volumes:
git clone https://github.com/whispem/minikv.git
cd minikv
make build
make serve
On macOS, port 5000 is taken by the AirPlay Receiver. Turn it off in System Settings › General › AirDrop & Handoff before running make serve.
Basic checks:
curl -s http://127.0.0.1:5000/health/live
curl -s http://127.0.0.1:5000/health/ready
curl -s http://127.0.0.1:5000/metrics
curl -s http://127.0.0.1:5000/admin/status
Store an object, then read it from the other coordinators. The coordinators listen on ports 5000, 5002 and 5004. Writes go to the leader: if coordinator 1 is not the leader, the PUT answers 503 and the x-minikv-leader header tells you which one is.
curl -X PUT --data-binary "hello" http://127.0.0.1:5000/s3/demo/hello.txt
curl http://127.0.0.1:5002/s3/demo/hello.txt
curl http://127.0.0.1:5004/s3/demo/hello.txt
Notebook-first SDK (preview) for data scientists and engineers:
Install and run example:
pip install -r sdk/python/requirements.txt
python examples/data_science_quickstart.py
Files:
sdk/python/minikv_client.pysdk/python/README.mdexamples/data_science_quickstart.pyDistribution and consistency:
Storage and query paths:
Security and tenancy building blocks:
These modules are implemented and tested on their own. Enforcing them on the HTTP API is planned for v2.1.0. The audit log already records the admin operations, with the actor unauthenticated.
Library modules that nothing in minikv uses yet: cross-datacenter replication, change data capture, data tiering, geo routing, plugins, the Kubernetes operator types and io_uring. Where one of them would report work that it does not do, it fails with a "not implemented" error.
APIs:
Writes, reads and deletes, the S3-compatible routes, batch and range, leader failover, volume heartbeats, /health/live, /health/ready, /admin/status and /metrics work.
The routes below are not implemented. They answer 501 Not Implemented with a JSON body that names the feature and the release planned for it, for example {"error":"not implemented","feature":"verify","roadmap":"2.1.0"}:
| Route | Feature | Planned for |
|---|---|---|
POST /admin/verify | verify | 2.1.0 |
POST /admin/repair | repair | 2.2.0 |
POST /admin/compact | compact | 2.2.0 |
POST /admin/scale | scale | 2.2.0 |
POST /admin/backup, GET /admin/backups, GET and DELETE /admin/backups/:id | backup | unscheduled |
POST /admin/restore | restore | unscheduled |
PUT /s3/:bucket/:key, PUT /:key and POST /:key with an X-Minikv-TTL header | ttl | unscheduled |
unscheduled means that no release plans the feature yet. A write with an X-Minikv-TTL header stores nothing.
The minikv CLI exits with:
0 on success;1 on failure: when the coordinator answers an error to get, put or delete, and always for verify, repair, compact, rebalance, upgrade and stream, which are not implemented. The message goes to standard error, for example error: verify is not implemented (roadmap: 2.1.0);2 when the arguments are invalid.Observability:
/metrics (text format 0.0.4): live volumes, keys and bytes per volume, Raft role, term and commit index, uptimeopentelemetry/prometheus-alerts.yml: no healthy volume for 2 minutesKubernetes:
k8s/helm/minikv/ does not start a working cluster: its templates pass none of the settings that the images need. See its README.k8s/operator/, k8s/rbac/, k8s/crds/ and k8s/examples/ are for a Kubernetes operator that minikv does not have.Runbooks:
docs/ops-backup-restore.md, for when backups exist: they are not implementeddocs/release-engineering-v2.0.0.mdPreflight commands:
make release-preflight
make release-preflight-full
v2.1.0:
verify)v2.2.0:
repair)compact)scale)rebalance)Future:
make build
make test
make fmt
make clippy
End-to-end cluster test (3 coordinators, 3 volumes, leader failover):
cargo test --release --test distributed_cluster -- --nocapture
Two of the time-series integration tests expect a coordinator on port 8000, as in CI:
cargo run --release --bin minikv-coord -- serve --id 1
Project layout:
src/
bin/ # minikv, minikv-coord, minikv-volume
common/ # auth, backup, cdc, metrics, replication, timeseries, ...
coordinator/ # Raft, metadata, placement, HTTP/gRPC APIs
volume/ # volume node storage and APIs
ops/ # cluster operations, not implemented yet: each one returns an error
k8s/ # Helm chart and operator manifests, neither of which works yet
opentelemetry/ # Prometheus, Grafana and Jaeger containers (minikv exports no traces)
sdk/python/ # notebook-first Python client preview
docs/ # runbooks and release engineering docs
Contributions are welcome. See CONTRIBUTING.md for coding, testing, and PR workflow.
MIT. See LICENSE.
481 followers · starred Jan 2026
157 followers · starred Feb 2026
516 followers · starred Jan 2026
728 followers · starred Mar 2026