On 07.10.19 14:36, Joey Golan wrote:
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?
If you get the numbers you want
(calls per second or registrations per
second), then it is fine.
Regarding app_lua, is it running on the same call
context or a
different one?
What do you mean here? Like "sip/voip call context", or "function call
context"?
Cheers,
Daniel
Thanks
------------------------------------------------------------------------
*From:* Daniel-Constantin Mierla <miconda(a)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.comwww.twitter.com/miconda --
www.linkedin.com/in/micondaKamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany --
https://asipto.com/u/kat
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany --
https://asipto.com/u/kat