<div class="gmail_quote"><div>Hello</div><div><br></div><div>for us Redis was a great solution for this problem: we run a kamailio based routing server that needs to handle millions of entries. mtree module worked great but it had a problem: after every change in the DB you need to perform a reload in order for the data to be in memory. For several million entires the reload took more than 3 minutes. That means that we needed to batch many changes and do a reload every few minutes (it made no sense to do a full reload for a single change). We moved to redis an soon as the ndb_redis module was released. With redis we have these advantages:</div>
<div>-No reload needed, any change is instanly available (no batch either)</div><div>-We can access the same redis instance from several servers</div><div>-Using redis pipelining and unix sockets (Vicente provided a patch for using them in ndb_redis module), the performance is really astonishing.</div>
<div><br></div><div>The disadvantage is that you no longer have a mt_match funcion, you have to build it yourself. The same logic can be applied to other modules that rely on a db backend but need to be loaded into memory for speed. For small size data the reload is very fast, but when it starts growing it may take a while.</div>
<div><br></div><div>Regards</div><div><br></div><div>Javi</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Fri, 15 Jun 2012 14:26:48 +0200<br>
From: Vicente Hernando <<a href="mailto:vhernando@systemonenoc.com">vhernando@systemonenoc.com</a>><br>
Subject: Re: [sr-dev] [SR-Users] New developer - Vicente Hernando<br>
To: "Olle E. Johansson" <<a href="mailto:oej@edvina.net">oej@edvina.net</a>><br>
Cc: Development mailing list of the sip-router project<br>
<<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>><br>
Message-ID: <<a href="mailto:4FDB2A08.4090902@systemonenoc.com">4FDB2A08.4090902@systemonenoc.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 06/15/2012 02:12 PM, Olle E. Johansson wrote:<br>
> 15 jun 2012 kl. 13:45 skrev Vicente Hernando:<br>
><br>
>> Hello Olle,<br>
>><br>
>> <a href="http://redis.io" target="_blank">http://redis.io</a><br>
>> <a href="http://en.wikipedia.org/wiki/Redis" target="_blank">http://en.wikipedia.org/wiki/Redis</a><br>
>> #redis in <a href="http://irc.freenode.org" target="_blank">irc.freenode.org</a><br>
>><br>
>> Redis is a non-SQL opensource network data store. It uses a key-value structure like a dictionary. Stores strings, and complex data tipes like sets, lists, etc.<br>
>><br>
>> It is written in C. Using hiredis library we can connect from kamailio to a running redis server. Kamailio module dealing with redis is named ndb_redis.<br>
>><br>
>> Redis data is stored in RAM, and its goal is being very fast.<br>
>><br>
>><br>
> Ok. Thanks. But are there things you can do in Redis that can't be done in other databases?<br>
><br>
> /O<br>
Actually, Redis is simpler than other databases. Its goal is speed. It<br>
tries to achieve high write and read speed.<br>
<br>
<a href="http://redis.io/topics/faq" target="_blank">http://redis.io/topics/faq</a><br>
<a href="http://redis.io/documentation" target="_blank">http://redis.io/documentation</a><br>
<br>
Regards,<br>
Vicente.<br>
<br>
>> Regards,<br>
>> Vicente.<br>
>><br>
>><br>
>><br>
>> On 06/15/2012 12:34 PM, Olle E. Johansson wrote:<br>
>>> Vicente,<br>
>>> Maybe you can take a moment or two and tell us old people about REDIS. What is it good for, how can it change how we use Kamailio?<br>
>>><br>
>>> I'm curious.<br>
>>><br>
>>> Thanks!<br>
>>><br>
>>> /O<br>
> ---<br>
> * Olle E Johansson - <a href="mailto:oej@edvina.net">oej@edvina.net</a><br>
> * Cell phone <a href="tel:%2B46%2070%20593%2068%2051" value="+46705936851">+46 70 593 68 51</a>, Office <a href="tel:%2B46%208%2096%2040%2020" value="+468964020">+46 8 96 40 20</a>, Sweden<br>
><br>
><br>
><br>
><br>
<br>
<br>
<br>
<br></blockquote></div>