[erlang-questions] presharding with eredis and poolboy
Jeremy Ong
jeremy@REDACTED
Thu Nov 22 02:52:05 CET 2012
If you aren't familiar with presharding, read
http://oldblog.antirez.com/post/redis-presharding.html
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
contribute.
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
http://www.jeremyong.com/blog/2012/11/21/sharded-eredis/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121121/819fef70/attachment.htm>
More information about the erlang-questions
mailing list