Redis compatible server framework for Go
Redis compatible server framework for Go
ListenAndServe and two types Conn & CommandThis library is also available for Rust and C.
go get -u github.com/tidwall/redconHere's a full example of a Redis clone that accepts:
You can run this example from a terminal:
go run example/clone.go…Redcon has full TLS support through the ListenAndServeTLS function.
The same example is also provided for serving Redcon over TLS.
go run example/tls/clone.goRedis: Single-threaded, no disk persistence.
$ redis-server --port 6379 --appendonly noredis-benchmark -p 6379 -t set,get -n 10000000 -q -P 512 -c 512
SET: 941265.12 requests per second
GET: 1189909.50 requests per secondRedcon: Single-threaded, no disk persistence.
$ GOMAXPROCS=1 go run example/clone.goredis-benchmark -p 6380 -t set,get -n 10000000 -q -P 512 -c 512
SET: 2018570.88 requests per second
GET: 2403846.25 requests per secondRedcon: Multi-threaded, no disk persistence.
$ GOMAXPROCS=0 go run example/clone.go$ redis-benchmark -p 6380 -t set,get -n 10000000 -q -P 512 -c 512
SET: 1944390.38 requests per second
GET: 3993610.25 requests per secondRunning on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.7
Josh Baker @tidwall
Redcon source code is available under the MIT License.
No open issues yet, or sync has not completed.