codis README

The project's README from github.com/CodisLabs/codis. As one markdown file: README.md.

Gitter Build Status

Codis is a proxy based high performance Redis cluster solution written in Go. It is production-ready and widely used at wandoujia.com and many companies. You can see Codis Releases for latest and most stable realeases.

Donation

Donate if you want to help us maintaining this project. Thank you! See this issue for details

Compared with Twemproxy and Redis Cluster

CodisTwemproxyRedis Cluster
resharding without restarting clusterYesNoYes
pipelineYesYesNo
hash tags for multi-key operationsYesYesYes
multi-key operations while reshardingYes-No(details)
Redis clients supportingAny clientsAny clientsClients have to support cluster protocol
"Resharding" means migrating the data in one slot from one redis server to another, usually happens while increasing/decreasing the number of redis servers.

Other Features

Tutorial

简体中文 English (WIP)

FAQ

简体中文 English (WIP)

High Availability

简体中文 English (WIP)

Architecture

architecture

Snapshots

Proxy proxy

Slots slots

Group group

Sentinel sentinel

Benchmarks

See benchmark results

Authors

Active authors:

Emeritus authors:

Thanks:

License

Codis is licensed under MIT, see MIT-LICENSE.txt


You are welcome to use Codis in your product, and feel free to let us know~ :)

codis (CodisLabs/codis)

Searching Database…

13.2K ·GitHub
这是什么?Codis 是一个基于代理的高性能 Redis 集群方案,用 Go 编写——它位于你的应用和一组 Redis 服务器之间。它已在生产环境验证,在 wandoujia.com 和许多其他公司被广泛使用。
所以我是在 Redis 服务器前面把 Codis 当作一个单独的服务来运行吗?没错。客户端连接 Codis 代理,就像连接一台普通的 Redis 服务器一样,由它把命令转发到后端的 Redis 实例。它支持大部分 Redis 命令,并且和 Twemproxy 完全兼容。
我怎么把它跑起来?从 Codis Releases 页面下载预编译的二进制文件——README 里指的就是这里,上面有最稳定的版本——或者用 make 从源码构建;仓库里也附带 Dockerfile。README 还链接了中文和英文的教程。
除了 Codis 和 Redis,我还需要运行别的东西吗?需要,一个协调存储:各个代理会把自己注册到 ZooKeeper 或 etcd 上,这也让客户端能够发现存活的代理并避开失效的。Sentinel 集成也是这套架构的一部分。
这东西实际部署在哪里?部署在你自己的基础设施上:它是一个服务端 Go 程序,由你自行托管在 Redis 实例旁边,仓库里带有 Dockerfile。管理面板是一个网页应用,用浏览器打开即可。
为什么选 Codis 而不是 Twemproxy 或 Redis Cluster?Twemproxy 不重启集群就无法重新分片,而 Codis 的重新分片是在线进行的——期间连多键操作都能继续工作。Redis Cluster 要求客户端支持集群协议,而 Codis 可以搭配任何标准客户端使用,还支持 pipeline。
重新分片到底是什么意思?就是把一个槽(slot)里的数据从一台 Redis 服务器迁移到另一台——通常在你增加或减少 Redis 服务器数量时进行。Codis 做这件事不需要重启集群。
它自带管理工具吗?有——一个图形化的网页管理面板,外加管理工具。README 里的截图展示了 proxies、slots、groups 和 Sentinel 的页面。
我能把 Codis 用在自己的产品里吗?可以。它采用 MIT 许可证,作者明确欢迎你在自己的产品中使用——他们甚至希望你告诉他们一声。
What are similar projects?go-redis, phpredis, garnet, dragonfly, sealos, FerretDB, teleport, ioredis
Creator
CodisLabs
Size
22.5 MB
Stars
13.2K
Age
11y
Commits · 90 Days