This is a Docker image with a custom build of Twemproxy, implementing Tarantool protocol.
Create a nutcracker.yml
file with the following content:
alpha:
listen: 127.0.0.1:3301
hash: fnv1a_64
distribution: ketama
auto_eject_hosts: true
protocol: tarantool
server_retry_timeout: 2000
server_failure_limit: 1
servers:
- tarantool1:3301:1
- tarantool2:3301:1
- tarantool3:3301:1
Then create a custom Dockerfile
:
FROM tarantool/twemproxy
COPY nutcracker.yml /etc/
Build new image:
docker build -t my-twemproxy-image .
And run it:
docker run -d --name twemproxy my-twemproxy-image