Twemproxy Installation Use

Source: Internet
Author: User

Twemproxy, also known as Nutcraker. is a twtter open source of a Redis and Memcache proxy server.

As an efficient caching server, Redis is of great application value. But when used more, it is hoped that the management can be unified in some way.

Avoid the loose nature of each client management connection for each application. At the same time it becomes controllable to some extent.

Twemproxy Features:


Support failed node automatic deletion

You can set the time to reconnect the node
You can set the number of connections before you delete the node
The method is suitable for cache storage
Support Settings hashtag

By hashtag you can set up two keyhash to the same instance.
Reduce the number of direct connections to Redis

Keep a long connection with Redis
You can set the number of connections for each Redis agent to the background
Automatic fragmentation to multiple Redis instances on the back end

Multiple hash algorithms (part not yet understood)
You can set the weight of a backend instance
Avoid a single point of issue

Multiple agent tiers can be deployed in parallel. Client automatically chooses one of the available
Support Redis pipelining Request

Support Status Monitoring

can set state monitoring IP and port, access IP and port can get a JSON format state information string
can set monitoring information refresh interval time
High throughput

Connection multiplexing, memory reuse.
Multiple connection requests are composed of Reids pipelining unified to Redis requests.


Twemproxy Introduction and download Address:

Https://github.com/twitter/twemproxy/tree/master


1: Download and install

wget Https://github.com/twitter/twemproxy/archive/v0.4.1.zip

Unzip Twemproxy-0.4.1.zip

CD twemproxy-0.4.1

Autoreconf-fvi

When performing autoreconf, a burst of error

Configure.ac:9: error:autoconf version 2.63 or higher is required. Refers to the autoconf version is low, need to install a high version.

Install autoreconf

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz

Tar zxvf autoconf-2.69.tar.gz

CD autoconf-2.69

./configure

Make
Make install

Need to cover the original
cp/usr/local/bin/autoconf/usr/bin/
cp/usr/local/bin/autoreconf/usr/bin/

Then execute AUTORECONF-FVI no error

./configure

Make
Make install

When the installation is complete, print the nutcracker-h to see if the installation is successful


2: Use

cp/usr/local/src/twemproxy-0.4.1/conf/nutcracker.yml/etc/
Vi/etc/nutcracker.yml


Check the configuration file

Nutcracker-t/etc/nutcracker.yml

Execute Nutcracker
Nutcracker-d-c/etc/nutcracker.yml

viewing processes
Ps-ef |grep Nutcracker |grep-v grep



3: Login to use


Set,get command to use OK, other functions can be played by themselves


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.