AnyEvent-Redis-Federated

 view release on metacpan or  search on metacpan

lib/AnyEvent/Redis/Federated.pm  view on Meta::CPAN

This is a wrapper around AnyEvent::Redis which adds timeouts,
connection retries, multi-machine cluster configuration (including
consistent hashing), node groups, and other magic bits.

=head2 HASHING AND SCALING

Keys are run through a consistent hashing algorithm to map them to
"nodes" which ultimately map to instances defined by back-end
host:port entries.  For example, the C<redis_1> node may map to the
host and port C<redis1.example.com:63791>, but that'll all be
transparent to the user.

However, there are features in Redis that are handy if you know a
given set of keys lives on a single insance (a wildcard fetch like
C<KEYS gmail*>, for example).  To facilitate that, you can specify a
"key group" that will be hashed insead of hashing the key.

For example:

  key group: gmail
  key      : foo@gmail.com



( run in 0.396 second using v1.01-cache-2.11-cpan-a1d94b6210f )