Hello 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: -No reload needed, any change is instanly available (no batch either) -We can access the same redis instance from several servers -Using redis pipelining and unix sockets (Vicente provided a patch for using them in ndb_redis module), the performance is really astonishing.
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. Regards Javi > Date: Fri, 15 Jun 2012 14:26:48 +0200 > From: Vicente Hernando <[email protected]> > Subject: Re: [sr-dev] [SR-Users] New developer - Vicente Hernando > To: "Olle E. Johansson" <[email protected]> > Cc: Development mailing list of the sip-router project > <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 06/15/2012 02:12 PM, Olle E. Johansson wrote: > > 15 jun 2012 kl. 13:45 skrev Vicente Hernando: > > > >> Hello Olle, > >> > >> http://redis.io > >> http://en.wikipedia.org/wiki/Redis > >> #redis in irc.freenode.org > >> > >> 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. > >> > >> 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. > >> > >> Redis data is stored in RAM, and its goal is being very fast. > >> > >> > > Ok. Thanks. But are there things you can do in Redis that can't be done > in other databases? > > > > /O > Actually, Redis is simpler than other databases. Its goal is speed. It > tries to achieve high write and read speed. > > http://redis.io/topics/faq > http://redis.io/documentation > > Regards, > Vicente. > > >> Regards, > >> Vicente. > >> > >> > >> > >> On 06/15/2012 12:34 PM, Olle E. Johansson wrote: > >>> Vicente, > >>> 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? > >>> > >>> I'm curious. > >>> > >>> Thanks! > >>> > >>> /O > > --- > > * Olle E Johansson - [email protected] > > * Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden > > > > > > > > > > > > >
_______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
