[OpenSIPS-Users] Database Searching

Alexey Kazantsev kurgan-rus at inbox.ru
Wed Aug 28 08:27:58 EDT 2019


Hi Mark,

I haven't understood well enough what data do you store in the table.

Something designed by OpenSIPS developers? E.g. 'subscribers' table.
Or some custom data which you use in your script say via AVPs?

If it's possible to store it as key-value pairs, I'd recommend you using
local cache [1], [2], [3]

[1]  https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc4
[2]  https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc5  
[3]  https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc6  
[4]  https://opensips.org/html/docs/modules/3.0.x/cachedb_redis.html  
[5]  https://opensips.org/html/docs/modules/3.0.x/cachedb_sql.html
[6]  https://opensips.org/html/docs/modules/3.0.x/exec.html  

Depending on your OpenSIPS architecture it can be more optimal to use Redis [4],
for example in case of OpenSIPS cluster.

You may use CACHEDB_SQL [5] (I never used it).
You may execute some script with the EXEC [6] function.

If your table is tiny and your system architecture allows it,
you may store data not in MariaDB but in SQLite.

So, as you see, many things depend on the overall size of your system,
and it's not so easy to give some certain advice without knowing
its architecture and load level.



-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/


More information about the Users mailing list