zoukankan      html  css  js  c++  java
  • Twemproxy分析

    twemproxy(又称为nutcracker)是一个轻量级的Redis和Memcached代理,主要用来减少对后端缓存服务器的连接数。
    由Twitter开源出来的缓存服务器集群管理工具,主要用来弥补Redis和Memcached对集群(cluster)管理指出的不足。
    项目地址:https://github.com/twitter/twemproxy

    安装

    Ubuntu下安装如下步骤:
    1.apt-get install automake
    2.apt-get install libtool
    3.git clone git://github.com/twitter/twemproxy.git
    4.cd twemproxy
    5.autoreconf -fvi
    6../configure --enable-debug=log
    7.make && make install
    8.src/nutcracker -h 测试配置文件
    nutcracker -d -c /usr/local/twemproxy/conf/nutcracker.yml -p /usr/local/twemproxy/run/redisproxy.pid -o /usr/local/twemproxy/run/redisproxy.log

    配制

    添加pid文件目录和配置文件conf目录
    cd /usr/local/twemproxy
    mkdir run conf

    添加proxy配置文件
    cd conf
    vim nutcracker.yml

    redis:
    listen: 127.0.0.1:22222
    redis: true
    hash: fnv1a_64
    distribution: ketama
    auto_eject_hosts: true
    timeout: 400
    server_retry_timeout: 2000
    server_failure_limit: 1
    servers:

    • 127.0.0.1:6379:1
    • 127.0.0.1:6380:1
    • 127.0.0.1:6381:1
    • 127.0.0.1:6382:1
  • 相关阅读:
    curl continue
    actor
    nginx
    jmx additional port
    diff
    lsof
    zk reconnect
    Python:Python基础(一)
    Python:初识Python(二)
    Python:初识Python(一)
  • 原文地址:https://www.cnblogs.com/sinaxyz/p/4303438.html
Copyright © 2011-2022 走看看