標籤:centos7 twemproxy
twemproxy 又叫netcracker,是一個高效能的協議路由器(Proxy 伺服器),可用於memcached/redis 叢集,支援資料分區。
在國外兜了一圈也沒發現有人對其進行rpm打包,估計大家都在等redis 3.0 cluster 吧。於是研究了一下,順手寫了個spec 檔案。編譯安裝對autoconf 和m4 有版本要求,所以這個srpm包 只能在centos 7 工作,centos6 上無法直接使用,除非升級依賴包。
由於對centos 7 的systemd 的開機啟動指令碼還不太熟悉,所以沒有包含啟動指令碼。
可以使用下面的辦法手動啟動或者加入/etc/rc.local 實現開機啟動
/usr/sbin/nutcracker -c /etc/twemproxy/nutcracker.yml -d
軟體包內容
#rpm -qpl twemproxy-0.4.0-2.el7.centos.x86_64.rpm/etc/twemproxy/etc/twemproxy/nutcracker.yml/usr/sbin/nutcracker/usr/share/man/man8/nutcracker.8.gz
下面是來自oschina的簡介
Twemproxy 是一個快速的單線程代理程式,支援 Memcached ASCII協議和更新的Redis協議。它全部用C寫成,使用Apache 2.0 License授權。項目在Linux上可以工作,而在OSX上無法編譯,因為它依賴了epoll API.
特性:
速度快
輕量級
維護持久的伺服器串連
Keeps connection count on the backend caching servers low.
啟用請求和響應的管道
支援代理到多個伺服器
同時支援多個伺服器集區
多個伺服器自動分享資料
實現了完整的 memcached ascii 和 redis 協議.
伺服器集區配置簡單,通過一個 YAML 檔案即可
Supports multiple hashing modes including consistent hashing and distribution.
可配置在失敗時禁用某個節點
Observability through stats exposed on stats monitoring port.
支援 Linux, *BSD, OS X and Solaris (SmartOS)
MD5值
aef8d577a88820372e781d251da71dba twemproxy-0.4.0-2.el7.centos.src.rpm
參考文檔
https://github.com/twitter/twemproxy
http://www.oschina.net/p/twemproxy
本文出自 “專註Linux 營運” 部落格,請務必保留此出處http://purplegrape.blog.51cto.com/1330104/1589679
【編譯打包】twemproxy-0.4.0-2.el7.centos.src.rpm