Skip to content

ekundo/godis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Godis?

Godis is simple implementation of Redis-like in-memory cache written in Go.

Features

Installation

To build Godis as a Docker image install and run Docker and use the following command:
docker build -t godis github.com/ekundo/godis

Playing with Godis

As a first step start Godis server with:
docker run -v $(pwd):/work -p 2121:2121 -it --rm godis

Then send commands to server using any tcp client like telnet

$ telnet 127.0.0.1 2121
set foo bar
+OK
get foo
$3
bar

Although redis-cli is the best choice:

$ redis-cli -p 2121 -h 127.0.0.1
redis> set foo bar
OK
redis> get foo
"bar"

Use command to get the list of available commands. Details of each command from the list can be found at redis command guide.

Performance testing results

Below are the testing results performed on my MacBook Pro 13 (Intel Core i5 2.9 GHz, 8 GB LPDDR3, SSD)

$ redis-benchmark -p 2121 -r 65536 -q -t SET,GET,LPUSH,RPUSH,LPOP,RPOP,HSET
SET: 21640.34 requests per second
GET: 26116.48 requests per second
LPUSH: 23342.67 requests per second
RPUSH: 22925.26 requests per second
LPOP: 24313.15 requests per second
RPOP: 25227.04 requests per second
HSET: 19105.85 requests per second

Test result are compared with such of original Redis server:

redis-benchmark -r 65536 -q -t SET,GET,LPUSH,RPUSH,LPOP,RPOP,HSET
SET: 50994.39 requests per second
GET: 51072.52 requests per second
LPUSH: 52938.06 requests per second
RPUSH: 52328.62 requests per second
LPOP: 52548.61 requests per second
RPOP: 51867.22 requests per second
HSET: 51519.84 requests per second

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published