[OpenSIPS-Users] Questions on hiredis client working with a "redis cluster"
Vlad Paiu
vladpaiu at opensips.org
Wed Oct 31 17:15:31 CET 2012
Hello,
The current OpenSIPS cachedb_redis implementation does not support the
Redis Sentinel.
I see it's a relatively new concept, currently only part of the Redis
/unstable/ branch.
The way the cachedb_redis module currently handles clusters in OpenSIPS
is that, at startup, it takes a snapshot of the Cluster ( with each
server handling what hash bucket ) and then, for each operation, it
internally runs CRC16 and detects the hash bucket and directs the query
to the specific server in the cluster.
Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com
On 10/31/2012 05:50 PM, Julien Chavanton wrote:
> The latest improvement on Redis module are very interesting, thanks
> for the contributiom, I would like to understand how the hiredis
> client is working with a "redis cluster"
>
> Where can I find information on the "server groups/cluster" support ?
>
> Is it working with "Redis Sentinel" (the official high availability
> solution for Redis).
>
> The hiredis client documentation are not mentioning this mechanics.
> https://github.com/redis/hiredis
>
>
>
>
>
> ---------------------------------------------------
> Module Documentation
> ---------------------------------------------------
>
> 1.5.1. cachedb_url (string)
>
> The urls of the server groups that OpenSIPS will connect to in order
> to use the from script cache_store,cache_fetch, etc operations. It can
> be set more than one time. The prefix part of the URL will be the
> identifier that will be used from the script.
>
> Example 1.1. Set cachedb_url parameter
>
> ...
> modparam("cachedb_redis", "cachedb_url","redis:group1://localhost:6379/");
> modparam("cachedb_redis",
> "cachedb_url","redis:cluster1://random_url:8888/");
> ...
>
>
> Example 1.2. Use Redis servers
>
> ...
> cache_store("redis:group1","key","$ru value");
> cache_fetch("redis:cluster1","key",$avp(10));
> cache_remove("redis:cluster1","key");
> ...
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121031/3e437b7b/attachment-0001.htm>
More information about the Users
mailing list