[sr-dev] Kamailio jwt module or Lua script

Joey Golan joeygo at gmail.com
Mon Oct 7 14:36:23 CEST 2019


I’ve implemented the token verification in Lua script and I’m using app_lua module to call the script from the configuration script inside the [AUTH] block.
It works fine but I want to be sure that I will not face performance degradation.
I’ve used the benchmark module to the log the execution duration. The results shows 130~ microseconds avg.
Do you think it will have impact on performance?
Regarding app_lua, is it running on the same call context or a different one?

Thanks

________________________________
From: Daniel-Constantin Mierla <miconda at gmail.com>
Sent: Monday, October 7, 2019 12:29 PM
To: Kamailio (SER) - Development Mailing List; Joey Golan
Subject: Re: [sr-dev] Kamailio jwt module or Lua script


Hello,

On 05.10.19 16:07, Joey Golan wrote:
Hi all,

I would like to authenticate subscribers using JWT tokens and I wonder which approach is better:
1. Writhing a dedicated kamailio module.
2. Writing a Lua script.

What would work better performance wise?

In terms of executing the same Kamailio C function exported to kamailio.cfg routing blocks or to Lua API/kemi, there is not any significant difference.

However, if you execute Lua code written by third party, it is not easy to say if it matches the same performances as an equivalent C function that you write.

You can go with the option you consider faster for development and then see if you are pleased with the results.

Cheers,
Daniel

-- Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20191007/13230648/attachment-0001.html>


More information about the sr-dev mailing list