breadis

Redis 和 redis sentinel 的透明分片/故障转移处理代理。「Transparent sharding/failover-handling proxy for redis and redis sentinel」

  • 所有者: mediocregopher/breadis
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

breadis

A proxy for redis cluster which automatically handles command redirection and
failover detection

To the client, acts just like a redis server. No changes necessary for any redis
client to communicate with it.

Usage

Compile with

go build

See command-line options with

./breadis --help

Load command-line options from config file with

./breadis --config <file>

See example config file with

./breadis --example

Use case

breadis acts as a simple proxy to an entire redis cluster, acting exactly the
same as a normal single redis instance (so any existing redis driver can already
talk to breadis).

This might seem a bit silly, since you could just use a cluster-aware driver in
your application to interact with the redis cluster. But this has two downsides:

  • You have to know you're interacting with a redis cluster in the first place,
    which may not always be the case. For instance, if in a dev environment an
    application commmunicates with a single redis on localhost:6379, but in
    production there is a cluster on multiple other boxes, that's something the
    application has to differentiate. Instead, the dev environment could keep
    using a single local redis, but in production the application server could
    have breadis listening on port 6379, meaning the application wouldn't have to
    know the difference.

  • The redis cluster handling isn't trivial, and works best when there is a
    persistant process managing it. This may not be possible in stateless, request
    based languages (e.g. PHP) or if you're executing a bunch of one-off scripts
    which use redis cluster. For these cases having a breadis instance handle the
    hard parts and just having the application hit it instead of doing the hard
    parts itself.

主要指标

概览
名称与所有者mediocregopher/breadis
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2014-08-12 01:24:45
推送于2015-02-24 22:21:10
最后一次提交2015-01-07 21:47:12
发布数0
用户参与
星数75
关注者数5
派生数4
提交数18
已启用问题?
问题数0
打开的问题数0
拉请求数0
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?