Questions tagged [twemproxy]

Twemproxy (nutcracker) is a fast, light-weight proxy for memcached and redis built by Twitter.

also known as nutcracker, is a fast and lightweight proxy for memcached and redis protocol. It was primarily built to reduce the connection count on the backend caching servers.

It was open-sourced by Twitter, under the Apache License, Version 2.0.

Features

  • Fast
  • Lightweight
  • Maintains persistent server connections
  • Keeps connection count on the backend caching servers low
  • Enables pipelining of requests and responses
  • Supports proxying to multiple servers
  • Supports multiple server pools simultaneously
  • Shard data automatically across multiple servers
  • Implements the complete memcached ascii and redis protocol
  • Easy configuration of server pools through a YAML file
  • Supports multiple hashing modes including consistent hashing and distribution
  • Can be configured to disable nodes on failures
  • Observability through stats exposed on stats monitoring port
  • Works with Linux, *BSD, OS X and Solaris (SmartOS)

Resources

37 questions
26
votes
2 answers

Twitter - twemproxy - memcached - Retry not working as expected

Simple setup: 1 node running twemproxy (vcache:22122) 2 nodes running memcached (vcache-1, vcache-2) both listening on 11211 I have the following twemproxy config: default: auto_eject_hosts: true distribution: ketama hash: fnv1a_64 listen:…
Mike Purcell
  • 19,847
  • 10
  • 52
  • 89
12
votes
1 answer

What's the difference between open source Redis cluster and Redis labs enterprise cluster?

We are planning to use Redis as centralized and highly available cache so we looked at Redis Labs Enterprise Cluster and homegrown Cluster-like setup using Redis along with twemproxy and sentinel. While researching about RELC we stumbled upon this…
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
7
votes
2 answers

Twemproxy Lag Forces a Restart

We are running a PHP stack on our app servers which use twemproxy locally (via socket), to connect to multiple upstream memcached servers (EC2 small instances) for our caching layer. Every so often I get an alert from our app monitor that a page…
Mike Purcell
  • 19,847
  • 10
  • 52
  • 89
4
votes
1 answer

node-redis can't connect to redis instance over twemproxy

The Problem Connecting directly through redis-cli to my twemproxy will correctly proxy me over to redis without any issues/disconnects. However, when I use node-redis to connect to twemproxy I get the following error: [Error: Redis connection gone…
Angelo R.
  • 2,285
  • 1
  • 17
  • 22
3
votes
0 answers

Using twemproxy with redis, 'auto_eject_hosts' not working

I've been using Twemproxy 0.3.0 with redis 2.8 following configurations. alpha: listen: 10.3.0.71:22121 hash: fnv1a_64 distribution: ketama auto_eject_hosts: true redis: true server_retry_timeout: 2000 server_failure_limit: 2 …
2
votes
2 answers

Benchmark Redis under Twemproxy with redis-benchmark

I am trying to test a very simple setup with Redis and Twemproxy but I can't find a way to make it faster. I have 2 redis servers that I run with bare minimum configuration: ./redis-server --port 6370 ./redis-server --port 6371 Both of the compiled…
Anastasios Andronidis
  • 6,310
  • 4
  • 30
  • 53
2
votes
2 answers

Installed Redis Cluster with Twemproxy, I am really confused about why some SET commands are MOVED

I have setup a Redis-Cluster with version 3.0.5 of Redis-Server (Ubuntu 14.04) For simplicity, we shall ignore replication. I have three redis instances running on localhost, ports 7001, 7002 and 7003. They are all made masters of a cluster with…
anastymous
  • 448
  • 5
  • 15
2
votes
0 answers

Global Redis Twemproxy Architecture

I'm launching a global service on a Node/Mongo/Redis stack. I've got an Architecture question about my Redis/Twemproxy config. Here's the crux of the issue: all of my data is 'global' - that is to say, users from anywhere around the world need to…
joshula
  • 535
  • 1
  • 5
  • 19
2
votes
1 answer

Using ServiceStack Redis with Twemproxy

I've been using ServiceStack PooledRedisClientManager with success. I'm now adding Twemproxy into the mix and have 4 Redis instances fronted with Twemproxy running on a single Ubuntu server. This has caused problems with light load tests (100 users)…
user173737
1
vote
0 answers

Not able to execute Redis keys or scan method to fetch keys by pattern on a redis server with nutcracker on it

I am trying to delete keys by pattern from redis server with nutcracker as proxy but it shows error while executing jedis.keys which I am using in my java code. It doesn't allow keys and scan method that I know. I am using simple set method to make…
Chanfool21
  • 57
  • 9
1
vote
0 answers

What's the different between mget and pipeline in twemproxy?

I use twemproxy and every key is a string type. I need to fetch more keys at once, like mget a b. Key's length is 10. But tp99 of mget is not stable, sometimes there is no error, but sometimes error qps is 5 or larger. Then I change mget to…
Bryce
  • 3,046
  • 2
  • 19
  • 25
1
vote
0 answers

Twemproxy key distribution

How twemproxy uses hash function and keys distribution method to decide which key will go to which shard? Is there any in which lib or code i can use to specify which hash function to use and given set of servers, can it tell which shard it will go…
1
vote
1 answer

Twitter/twemproxy on Windows

Is any chance to run twemproxy on windows server? Is there a Windows port of twemproxy? Or similar program for Windows? Why twemproxy on Windows? Because we have web applications that running under IIS. I want to reduce network communication…
Petofi
  • 481
  • 5
  • 16
1
vote
0 answers

Twemproxy GEOADD command

From what I understand the GEOADD command / data structure is very similar to using ZADD. When I run GEOADD through my twemproxy server, I get an error: Error: Server closed the connection If I issue the command directly to the redis servers…
user479947
1
vote
1 answer

Why redis instance gave Out Of Memory issue if server had plenty of memory available?

Redis setting and twemproxy: We have six instances of Redis(32 bit) version 3.2.3 running on the same server (AWS EC2 instance r3.xlarge) along with Twemproxy. It was running smoothly until few days. Individual instances have started giving OOM…
Aditya Chowdhry
  • 349
  • 3
  • 9
1
2 3