High-performance Redis proxy Twemproxy

Source: Internet
Author: User
Tags redis cluster

Twemproxy is a Redis middleware Agent with many Useful features , you can temporarily replace a subset of the Redis Cluster Features:

2 supports automatic deletion of failed nodes

2 you can set the time to reconnect the node

2 You can set how many times to connect and then delete the node

2 This method is suitable as a cache storage

2 Support Settings HashTag

2 by HashTag You can set your own two KEY hash to the same instance up.

2 reduce the number of direct connections to Redis

2 maintain a long connection to Redis

2 the number of each Redis connection can be set for the agent and background

2 Auto-shard to backend on multiple Redis instances

2 multiple hash algorithms

2 you can set weights for back-end instances

2 avoid a single point of problem

2 multiple Agent tiers can be deployed in parallel, and theclient automatically selects an available

2 support for status monitoring

2 State Monitoring IP and port can be set, Access IP and port can get a JSON -formatted status information string

2 can set monitoring information refresh interval time

2 High Throughput

2 connection multiplexing, memory reuse.

2 composing multiple requests into Redis pipelining Unified request to Redis

Installation Problem ResolutionTwemproxy tarball bundle in Google Code , unable to download the ... You can only download the source package from GitHub for manual compilation. installed, upgraded autoconf (2.64 above,:http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz),automake,Libtool , but has been unable to compile the installation successfully. Not "error:possibly undefined macro:am_init_automake", is reported "cannot find Install-sh, install.sh, or shtool ". Finally foundSolution 1and settlement of the Act of 2.

Finally, I'm sure that the way to successfully compile the installation in my environment is:

>TAR-XZVF twemproxy-0.4.0.tar.gz

>aclocal ( fix error 1)

>autoconf-f-v–i

>autoreconf-f-i-wall,no-obsolete ( fix error 2)

>./configure--enable-debug=full

( You can turn on O3 optimization:cflags= "-o3-fno-strict-aliasing"./configure)

>make

>src/nutcracker–h ( See various options )

Configure and run

conf/nutcracker.yml is the default use of the configuration file, you can see the configuration of alpha, beta, gamma, Delta, Omega Five connection pools as an example. We only retain Alphaand configure two Redis servers with ports 6379 and 6479. After that, two Redis instances are configured and started accordingly. You can start twemproxy now, and you can run the src/nutcracker directly.

Test if it's connected. Connect to the twemproxy listening port with the redis-cli-p 22121 , execute some set commands, and then connect to two Redis instances to see some Key-value was saved in.

High-performance Redis proxy Twemproxy

Related Article

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.