AlfheimDB

A linearizability distributed database by raft and wisckey, which supports redis client.

Build

This project build by mage, you will need install it at first:

go get github.com/magefile/mage

Execute “mage build” in project dir:

mage build

Test Case

The single node test:

mage initDataDir
mage test single

You can also startup a test cluster, the magefile include a cluster test case:

mage initDataDir
mage test id1
mage test id2
mage test id3

Dependencies

Command Support

String

  • Set
  • Get
  • Incr
  • Del

Benchmarks

Macbook pro 13, 2020(M1)

Single node test case

Set/Incr and Get:

./redis-benchmark -p 6379 -t set,get -n 1000000 -q  -c 512
ERROR: ERR unknown command 'CONFIG'
ERROR: failed to fetch CONFIG from 127.0.0.1:6379
WARN: could not fetch server CONFIG
SET: 114850.12 requests per second, p50=2.727 msec                    
GET: 161524.80 requests per second, p50=1.447 msec 

Three node test case

Set/Incr and Get:

./redis-benchmark -p 6379 -t set,get -n 500000 -q  -c 512
ERROR: ERR unknown command 'CONFIG'
ERROR: failed to fetch CONFIG from 127.0.0.1:6379
WARN: could not fetch server CONFIG
SET: 66952.33 requests per second, p50=6.279 msec                    
GET: 161917.09 requests per second, p50=1.447 msec 

References

Raft: “Raft: In Search of an Understandable Consensus Algorithm”

Wisckey: “WiscKey: Separating Keys from Values in SSD-conscious Storage”(FAST2016)

Todo List

  • WASM script
  • mage build
  • High performance WAL log
  • Set support
  • Map support
  • ZSet support

GitHub

View Github