NubeDB is a simple distributed key-value database that uses the Raft consensus algorithm for data replication and consistency.
- Distributed and replicated data storage
- Simple to use
- Automatic fail-over and recovery if any of the nodes go down.
- Limitations:
- The system needs 1 leader and 2 nodes to operate correctly.
- It can go down as far as 1 leader and 1 node, but there are no warranties that it will be stable.
- Limitations:
- TODO:
- True auto-scaling, in which a number of arbitrary nodes can be removed when the whole cluster is down, and the system can still reach a quorum on startup.
docker-compose up -d
NubeDB provides a simple REST API for accessing its k/v database. You can interact with it using any HTTP client.
To check the consensus state, you can send a GET
request to consensus
:
To check the consensus health, you can send a GET
request to health
. It will return only a status code for simplicity:
To store a value for a key, you can send a POST
request to store
:
To retrieve a value for a key, you can send a GET
request to store
:
To retrieve all keys in the DB, you can send a GET
request to store/keys
:
To delete a key, you can send a DELETE
request to store
:
To get a full backup of the DB, you can visit or send a GET
request to store/backup
:
To restore a backup of the DB, you can send a POST
request to store/restore
:
First ensure you are sending a form-data
with a key backup
as a file
: