[OpenSIPS-Users] AUTH_DB module database queries

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Apr 8 15:38:34 EST 2021


Hi John,

See inline answers.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Bootcamp 2021 online
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 4/8/21 5:45 PM, John Quick wrote:
> I am auditing an existing opensips.cfg script trying to identify all
> possible places where a database query is executed.
> The purpose is to optimise performance by reducing the number of DB queries
> and eliminating any unnecessary synchronous database queries.
>
> I would like to know more about what happens when the script calls the
> proxy_authorize() function.
> I assume it must be querying the subscriber table, but is this a synchronous
> query?
yes, it is a blocking query.
> Does the AUTH_DB module do any caching of data or will it always read
> directly from the DB table?
no caching
> Is there any difference between v2.4 and v3.1 here?
no
> Is there anything on the roadmap that may be relevant?
no
>
> The behaviour of proxy_authorize() could be relevant to system performance
> and reliability in the following situations:
>   - An OpenSIPS system under heavy load with many call attempts per second
>   - Where an unexpected network or DB-server issue results in slow DB query
> responses - potentially crashing OpenSIPS
>   - If a "rogue" customer device or malicious hacking attempt generates large
> numbers of requests which all call proxy_authorize()
you can replace the proxy_authorize() with pv_proxy_authorize() (where 
you provide the pwd from script) and manage the pwd retrieval from 
script level, with async queries + caching.
>
> John Quick
> Smartvox Limited
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list