go-redis-proxy

A lightweight Redis proxy in Go that parses RESP and routes read-only commands to a replica and writes to the master.

Goredis · proxy · respinfrastructuresource on github

Why

Take read load off the Redis master without changing the client.

How

One listener per configured route and one goroutine per client. Each command is parsed from RESP, checked against a list of read-only commands and forwarded to the replica or the master. Ships with a Dockerfile, a Helm chart, docker-compose and end-to-end and load tests.

[
  {
    "listen": 6380,
    "master": { "host": "host01", "port": 6378 },
    "slave": [{ "host": "host02", "port": 6380 }]
  }
]
$ git clone https://github.com/zombocoder/go-redis-proxy
← all projects