Redcon – Fast Redis server implementation for Go

Fast Redis compatible server framework for Go

Redcon is a custom Redis server framework for Go that is fast and simple to use. The reason for this library it to give an efficient server front-end for the BuntDB and Tile38 projects.


Create a Fast custom Redis compatible server in Go
Simple interface. One function ListenAndServe and one type Conn
Support for pipelining and telnet commands
Works with Redis clients such as redigo, redis-py, node_redis, and jedis

go get -u


Here’s a full example of a Redis clone that accepts:

SET key value
GET key
DEL key
You can run this example from a terminal:

package main

import (


var addr = “:6380”

func main() {
var mu sync.RWMutex
var items = make(map[string]string)
go log.Printf(“started server at %s”, addr)
err := redcon.ListenAndServe(addr,
func(conn redcon.Conn, commands [][]string) {
for _, args := range commands {
switch strings.ToLower(args[0]) {
conn.WriteError(“ERR unknown command ‘” + args[0] + “‘”)

Original URL:

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: