Suor/django-cacheops — pull request #68 by ttyS15 (2013-12-30 13:56:13+00:00)
Title: Draft changes for sharding cacheops

Hi, Alexander!

It seems I have got working version of sharded cacheops. I changed a lock behavior for compatibility with `twemproxy`. After that I assembled scheme with twemproxy and two redis servers behind it. And it works perfectly. Of course, I did not test it with high concurrency and high load yet. I plan to check my changes on test stage and production after vacation.

But now I would be happy if you will check my changes and discuss it with me.

I see some narrow places in the new behavior. Like `max lock time`. But there are some improvements. For instance, lock became more granular.

Also versions of server and client must be increased. Server >= 2.6.12, client >= 2.7.4

You can see my twemproxy config (YAML)

redis1:
listen: 192.168.144.170:6379
redis: true
hash: fnv1a_64
distribution: ketama
auto_eject_hosts: true
timeout: 400
server_retry_timeout: 2000
server_failure_limit: 1
servers:
- 192.168.144.151:6379:1
- 192.168.144.61:6379:1

Thanks in advance!