Databases
EchoVault is a highly configurable, distributed, in-memory data store and cache implemented in Go. It can be imported as a Go library or run as an independent service.
EchoVault aims to provide a rich set of data structures and functions for manipulating data in memory. These data structures include, but are not limited to: Lists, Sets, Sorted Sets, Hashes, and much more to come soon.
EchoVault provides a persistence layer for increased reliability. Both Append-Only files and snapshots can be used to persist data in the disk for recovery in case of unexpected shutdowns.
Replication is a core feature of EchoVault and is implemented using the RAFT algorithm, allowing you to create a fault-tolerant cluster of EchoVault nodes to improve reliability. If you do not need a replication cluster, you can always run EchoVault in standalone mode and have a fully capable single node.
EchoVault aims to not only be a server but to be importable to existing projects to enhance them with EchoVault features, this capability is always being worked on and improved.
Features offered by EchoVault include:
We are working hard to add more features to EchoVault to make it much more powerful. Features in the roadmap include:
Install EchoVault with: go get github.com/echovault/echovault
.
Here's an example of using EchoVault as an embedded library. You can access all of EchoVault's commands using an ergonomic API.
func main() {
server, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
_, _, _ = server.Set("key", "Hello, world!", echovault.SETOptions{})
v, _ := server.Get("key")
fmt.Println(v) // Hello, world!
// (Optional): Listen for TCP connections on this EchoVault instance.
server.Start()
}
An embedded EchoVault instance can still be part of a cluster, and the changes triggered from the API will be consistent across the cluster.
To install via homebrew, run:
brew tap echovault/echovault
brew install echovault/echovault/echovault
Once installed, you can run the server with the following command:
echovault --bind-addr=localhost --data-dir="path/to/persistence/directory"
docker pull echovault/echovault
The full list of tags can be found here.
docker pull ghcr.io/echovault/echovault
The full list of tags can be found here.
You can download the binaries by clicking on a release tag and downloading the binary for your system.
EchoVault uses RESP, which makes it compatible with existing Redis clients.
The following benchmark only applies to the TCP client-server mode.
Hardware: MacBook Pro 14in, M1 chip, 16GB RAM, 8 Cores
Command: redis-benchmark -h localhost -p 7480 -q -t ping,set,get,incr,lpush,rpush,lpop,rpop,sadd,hset,zpopmin,lrange,mset
Result:
PING_INLINE: 89285.71 requests per second, p50=0.247 msec
PING_MBULK: 85543.20 requests per second, p50=0.239 msec
SET: 65573.77 requests per second, p50=0.455 msec
GET: 79176.56 requests per second, p50=0.295 msec
INCR: 68870.52 requests per second, p50=0.439 msec
LPUSH: 27601.44 requests per second, p50=1.567 msec
RPUSH: 61842.92 requests per second, p50=0.519 msec
LPOP: 58548.01 requests per second, p50=0.567 msec
RPOP: 68681.32 requests per second, p50=0.439 msec
SADD: 67613.25 requests per second, p50=0.479 msec
HSET: 56561.09 requests per second, p50=0.599 msec
ZPOPMIN: 70972.32 requests per second, p50=0.359 msec
LPUSH (needed to benchmark LRANGE): 26434.05 requests per second, p50=1.623 msec
LRANGE_100 (first 100 elements): 26939.66 requests per second, p50=1.263 msec
LRANGE_300 (first 300 elements): 5081.82 requests per second, p50=9.095 msec
LRANGE_500 (first 500 elements): 2554.87 requests per second, p50=18.191 msec
LRANGE_600 (first 600 elements): 1903.96 requests per second, p50=24.607 msec
MSET (10 keys): 56022.41 requests per second, p50=0.463 msec