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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?