twemproxy 安装
twemproxy
安装
1. 获取安装包
shell> wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
shell> wget https://codeload.github.com/twitter/twemproxy/zip/master
#twemproxy要求autoconf的版本在2.64以上
2. 编译安装
shell> unzip ./twemproxy-master.zip shell> tar -zxvf ./autoconf-2.69.tar.gz shell> cd ./autoconf-2.69 shell> ./configure --prefix=/usr/ shell> make && make install
shell> /usr/bin/autoconf -V
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille.
shell> cd twemproxy-master shell> autoreconf -fvi
shell> configure.ac:36: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation. shell> yum -y install libtool
shell> autoreconf -fvi
shell> ./configure --prefix=/usr/local/twemproxy shell> make -j `grep processor /proc/cpuinfo | wc -l` shell> make install
3.增加配置文件
shell> cd /usr/local/twemproxy shell> cat > /usr/local/twemproxy/nutcracker.yml << EOF memcache: listen: 0.0.0.0: hash: fnv1a_64 distribution: ketama auto_eject_hosts: true redis: false timeout: server_retry_timeout: server_failure_limit: servers: - 172.18.18.52:: - 172.18.18.53:: - 127.18.3.11:: - 172.18.3.12:: #- 172.18.3.4:: #- 172.18.3.7:: EOF
4. 启动服务
shell> vi /etc/sysconfig/iptables shell> -A INPUT -m state --state NEW -m tcp -p tcp --dport -j ACCEPT #开放防火墙端口11210 shell> /etc/init.d/iptables restart shell> nutcracker -t #测试配置文件 shell> /usr/local/twemproxy/sbin/nutcracker -d -c /usr/local/twemproxy/nutcracker.yml #指定配置文件启动
5.启动命令详解
Usage: nutcracker [-?hVdDt] [-v verbosity level] [-o output file]
[-c conf file] [-s stats port] [-a stats addr]
[-i stats interval] [-p pid file] [-m mbuf size]
| 参数 | 释义 |
|---|---|
| -h, –help | 查看帮助文档,显示命令选项 |
| -V, –version | 查看nutcracker版本 |
| -t, –test-conf | 测试配置脚本的正确性 |
| -d, –daemonize | 以守护进程运行 |
| -D, –describe-stats | 打印状态描述 |
| -v, –verbosity=N | 设置日志级别 (default: 5, min: 0, max: 11) |
| -o, –output=S | 设置日志输出路径,默认为标准错误输出 (default: stderr) |
| -c, –conf-file=S | 指定配置文件路径 (default: conf/nutcracker.yml) |
| -s, –stats-port=N | 设置状态监控端口,默认22222 (default: 22222) |
| -a, –stats-addr=S | 设置状态监控IP,默认0.0.0.0 (default: 0.0.0.0) |
| -i, –stats-interval=N | 设置状态聚合间隔 (default: 30000 msec) |
| -p, –pid-file=S | 指定进程pid文件路径,默认关闭 (default: off) |
| -m, –mbuf-size=N | 设置mbuf块大小,以bytes单位 (default: 16384 bytes) |
Twemproxy是一种代理分片机制,由Twitter开源。Twemproxy作为代理,可接受来自多个程序的访问,按照路由规则,转发给后台的各个Redis服务器,再原路返回。
twemproxy 安装的更多相关文章
- twemproxy 安装与配置
转自:http://blog.csdn.net/u011183653/article/details/21240749 说到twemproxy就不得不说要一下redis,这是因为twemproxy是为 ...
- Twemproxy 缓存代理服务器
Twemproxy 缓存代理服务器 Twemproxy 概述 Twemproxy(又称为nutcracker)是一个轻量级的Redis和Memcached代理,主要用来减少对后端缓存服务器的连接数.T ...
- 基于Twemproxy的Redis集群方案
概述 由于单台redis服务器的内存管理能力有限,使用过大内存redis服务器的性能急剧下降,且服务器发生故障将直接影响大面积业务.为了获取更好的缓存性能及扩展型,我们将需要搭建redis集群来满足需 ...
- Redis/SSDB+Twemproxy的配置与使用(Mac/Linux平台)
对于redis而已,相信不少的后台开发人员一直都在使用,相比memcache而已,redis不仅可以作为key-value缓存使用,而且提供了丰富的数据结构如set.list.map等,能够实现很多复 ...
- 基于 twemproxy 搭建 redis 集群
概述 由于单台redis服务器的内存管理能力有限,使用过大内存redis服务器的性能急剧下降,且服务器发生故障将直接影响大面积业务.为了获取更好的缓存性能及扩展型,我们将需要搭建redis集群来满足需 ...
- Twemproxy分析
twemproxy(又称为nutcracker)是一个轻量级的Redis和Memcached代理,主要用来减少对后端缓存服务器的连接数. 由Twitter开源出来的缓存服务器集群管理工具,主要用来弥补 ...
- TwemProxy Redis架构
TwemProxy 1.twemproxy是twitter开发的一个redis代理proxy. 通过Twemproxy可以使用多台服务器来水平扩张redis服务,可以有效的避免redis单点故障问题. ...
- Redis Twemproxy
主从复制+哨兵解决了读性能和高可用问题,但没有解决写性能问题. Twemproxy将写请求分配到不同节点处理. Twemproxy是Twitter开源的一个redis和memcache代理服务器. 允 ...
- 基于twemproxy的redis集群部署
一.系统及软件版本 操作系统:CentOS Linux release 7.3.1611 (Core) 内核版本:3.10.0-514.el7.x86_64 redis版本:3.2.8 twempro ...
随机推荐
- thrift的简单实现
1.使用windows实现,首先在apache官网下载一个thrift的编译工具,在项目中建一个文件叫add.thrift的文件,内容如下: namespace java com.vipshop.sa ...
- Filter及FilterChain的使用详解
原文地址:http://blog.csdn.net/zhaozheng7758/article/details/6105749 一.Filter的介绍及使用 什么是过滤器? 与Servlet相似,过滤 ...
- jquery编写插件
jquery编写插件的方法 版权声明:作者原创,转载请注明出处! 编写插件的两种方式: 1.类级别开发插件(1%) 2.对象级别开发(99%) 类级别的静态开发就是给jquery添加静态方法,三 ...
- Qweb报表中的Reload from Attachment参数
通过继承的方式修改了Qweb报表却发现没有生效,经查,其原因在于报表的设置中勾选了 Reload from Attachment 选项. 将本选项取消选中即可生效.
- ios app 开发中ipa重新签名步骤介绍-备
作为一个app应用程序开发者,在app应用程序在苹果商店上架前总需要将安装包安装到ios机器上进行测试,这个时候我们就需要打包in house版本的ipa了,打包in house实际上是一个将ipa应 ...
- LPC1758串口ISP下载程序
最近手上拿到一块人家公司做的3D打印机的板子,用的核心芯片是LPC1758,板上引出了ISP下载接口.那接口共4个引出脚,如下图所示: 其中ME_EN引脚又连接到了芯片的P2[10]引脚,那个引脚 ...
- Ubuntu 下对ADT 添加别名(alias)
1:~$ vim .bashrc 2:在打开的.bashrc文件中加入: alias adt='./adt-bundle-linux-x86-20130729/eclipse/eclipse' 3:保 ...
- rsyslog 解决日志截断不读取问题
reopenOnTruncate [on/off] (requires v8.16.0+) Default: off 这是一个实验性的东西告诉rsyslog 重新input file 当它被trunc ...
- HDOJ 1391 Number Steps(打表DP)
Problem Description Starting from point (0,0) on a plane, we have written all non-negative integers ...
- Redis分布式缓存 教程以及DEMO
原文地址:http://blog.csdn.net/qiujialongjjj/article/category/1800171 redis demo源码下载:http://download.csdn ...