Hi Fred,

Much appreciate this info and the prompt answer. I was hoping for a more 
comprehensive dive into how this mysql->redis is implemented through those 
mentioned keys in the code. I got a bit entangled into these entry_manual_keys, 
type_keys, new_type keys šŸ˜ž


Thank you again,

Lucian

________________________________
From: Fred Posner <[email protected]>
Sent: Thursday, October 23, 2025 8:51:33 PM
To: Kamailio (SER) - Development Mailing List
Cc: Lucian Balaceanu
Subject: Re: [sr-dev] Keys used in the db_redis code

> On Oct 23, 2025, at 6:38 AM, Lucian Balaceanu via sr-dev 
> <[email protected]> wrote:
>
> Hello,
>  I am currently working around the db_redis module and don't gasp very well 
> the keys involved in the queries: entry_manual_keys, query_keys, type_keys, 
> new_type_keys, all_type_keys.
>  Any info about these and how these keys map to specific structures inside 
> default location table? (location has: location:entry::uloc , 
> location:usrdom::user:domain, location::index::usrdom)
>  Thank you,
> Lucian

Hello Lucian,

I think the devs of the module tried (and did a far better job than I could 
have) to explain the difference between db_redis and a traditional sql db in 
the README file:

https://www.kamailio.org/docs/modules/stable/modules/db_redis.html

"Because Redis is a key-value store, it requires unique keys. This means that 
tables and rows from a relational SQL database, e.g. from MySQL, can not be 
ported one a 1:1 basis to Redis.ā€

If you, for example wanted to use db_redis for usrloc (location), an example 
could be:

modparam("db_redis", "keys", "version=entry:table_name")
modparam("db_redis", "keys", 
"location=entry:ruid&usrdom:username,domain&timer:partition,keepaliveā€)

The usage section also has some examples for set-up:

https://www.kamailio.org/docs/modules/stable/modules/db_redis.html#db_redis.sec.usage

Fred Posner
Tel: +1 (352) 664-3733
Alt: +1 (224) 334-3733

Contact info at https://fredp.xyz



_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to