[erlang-questions] presharding with eredis and poolboy

Jeremy Ong <>
Thu Nov 22 02:52:05 CET 2012

If you aren't familiar with presharding, read

I made some modifications to the eredis_pool application. This application
integrates Wooga's eredis client and Devinus's poolboy. I thought I would
mention it here in case anybody found it useful or if people wanted to

In sharded_eredis: https://github.com/jeremyong/sharded_eredis, each pool
points to a different preconfigured shard.

Running sharded_eredis:q([Cmd, Key, Args]) will hash the key and execute
the command on the correct pool.

It also supports transactions but requires that all commands occur on the
same node (this is not enforced yet).

Things to do:
- Give a clean way for the application can be reconfigured at runtime (in
the case where shards are moved for example).
- Handle transactions better
- Create a library of convenience scripts for managing many redis shards
and moving things around (slaves, replication, failover, etc).

see also my mini blog post on the matter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121121/819fef70/attachment.html>

More information about the erlang-questions mailing list