Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixge/go-redis
A redis implementation written in Go.
https://github.com/felixge/go-redis
Last synced: about 2 months ago
JSON representation
A redis implementation written in Go.
- Host: GitHub
- URL: https://github.com/felixge/go-redis
- Owner: felixge
- Created: 2013-06-16T11:45:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-16T12:06:17.000Z (over 11 years ago)
- Last Synced: 2024-10-11T15:19:24.372Z (2 months ago)
- Language: Go
- Size: 104 KB
- Stars: 54
- Watchers: 6
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-redis
A redis implementation in Go.
Thanks to US Airways treating me to an unexpected 9 hour layover at PHL, I
found myself with a little extra time, so I hit the bar and decided to see if I
could implement a Go server implementing the [redis
protocol](file://localhost/Users/felix/Desktop/redis.html) and GET/SET
commands.I spend probably 2 - 3 hours on this, and the result is kind of neat, as it
seems to perform almost as well as redis itself without attempting any forms of
optimizations yet.Given that I'm now stuck at BRU, I'll probably implement this in node.js as
well for comparison. To be continued ...## Running
```
go run main.go
```## Performance
The numbers below should give you a rough idea, but don't take the numbers too
seriously as I've not done any extensive analysis here.**go-redis:**
```
$ redis-benchmark -t GET,SET -n 100000
====== SET ======
100000 requests completed in 1.18 seconds
50 parallel clients
3 bytes payload
keep alive: 198.25% <= 1 milliseconds
99.99% <= 2 milliseconds
100.00% <= 2 milliseconds
84459.46 requests per second====== GET ======
100000 requests completed in 1.17 seconds
50 parallel clients
3 bytes payload
keep alive: 198.33% <= 1 milliseconds
100.00% <= 1 milliseconds
85616.44 requests per second
```**redis:**
```
$ redis-benchmark -t GET,SET -n 100000
====== SET ======
100000 requests completed in 1.11 seconds
50 parallel clients
3 bytes payload
keep alive: 199.95% <= 1 milliseconds
99.97% <= 2 milliseconds
100.00% <= 2 milliseconds
89847.26 requests per second====== GET ======
100000 requests completed in 1.12 seconds
50 parallel clients
3 bytes payload
keep alive: 199.95% <= 1 milliseconds
100.00% <= 1 milliseconds
89206.06 requests per second
```