Storage instances

18 views
Skip to first unread message

Travis Warlick

unread,
May 26, 2011, 4:58:29 PM5/26/11
to rack-cache
I would like to use a Redis::Distributed instance for the metastore;
however, since rack-cache.metastore only supports URIs, I'm wondering
if this was an intentional design decision and if a concept like this
could be successfully merged into that design:

use Rack::Cache, :metastore =>['redis://redis1/0', 'redis://
redis2/0']

Quick background on why I want to do this: Redis::Distributed
instances uses a sharding technique to distribute the keys across
multiple instances. We have 6 app servers, and we run a redis
instance on each one to distribute the data without having to use
replication.

Ryan Tomayko

unread,
May 26, 2011, 5:35:48 PM5/26/11
to rack-...@googlegroups.com
On Thu, May 26, 2011 at 1:58 PM, Travis Warlick <twar...@gmail.com> wrote:
> I would like to use a Redis::Distributed instance for the metastore;
> however, since rack-cache.metastore only supports URIs, I'm wondering
> if this was an intentional design decision and if a concept like this
> could be successfully merged into that design:
>
>    use Rack::Cache, :metastore =>['redis://redis1/0', 'redis://
> redis2/0']

Yes. I'd definitely like to support custom stores at some point. Right
now you can achieve this by adding a constant to
Rack::Cache::MetaStore::REDIS and Rack::Cache::EntityStore::REDIS
pointing to the implementation classes. I'd like to add a cleaner API
sometime in the future.

Also, I'd accept a patch to add Redis meta and entity stores for sure.

> Quick background on why I want to do this: Redis::Distributed
> instances uses a sharding technique to distribute the keys across
> multiple instances.  We have 6 app servers, and we run a redis
> instance on each one to distribute the data without having to use
> replication.

Nice.

Ryan

Reply all
Reply to author
Forward
0 new messages