Discussion:
[SR-Users] Asynchronous sql operation also for acc module?
Sebastian Damm
2014-10-21 09:06:41 UTC
Permalink
Hi,

I read the article about asynchronous sqlops:
http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-4-asynchronous-sql.html

I was wondering whether there are any plans of bringing that feature to the
acc module, too. We have seen it in the past that a blocking database
server brought our proxy to a halt because the acc module was blocking,
too. So this could help a lot if the acc entries were written
asynchronously.

Best Regards,
Sebastian
Daniel-Constantin Mierla
2014-10-21 14:21:34 UTC
Permalink
Hello,

it is possible, with same limitation that the database connector module
needs to support async operation -- see db_insert_mode parameter for acc
module.

And because was asked, I added it to the blogs list as well:
- http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-8-asynchronous.html

Cheers,
Daniel
Post by Sebastian Damm
Hi,
http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-4-asynchronous-sql.html
I was wondering whether there are any plans of bringing that feature
to the acc module, too. We have seen it in the past that a blocking
database server brought our proxy to a halt because the acc module was
blocking, too. So this could help a lot if the acc entries were
written asynchronously.
Best Regards,
Sebastian
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Sebastian Damm
2014-10-22 06:36:18 UTC
Permalink
Hi Daniel,

thanks for the explanation and blog post. However, this is a different
approach than the asynchronous sqlops function, right? In sqlops, the
request is sent to an asynchronous worker in Kamailio and does the SQL
operation when possible. In acc, only the request is a different one. And
if the MySQL server really has a problem, it can happen that it doesn't
return from the an INSERT DELAYED query immediately. If the MySQL query is
not detached from the SIP worker, the problem of a blocking SIP proxy is
still there. Is it possible to use the asynchronous worker for the acc
requests, too?

Best Regards,
Sebastian
Post by Daniel-Constantin Mierla
Hello,
it is possible, with same limitation that the database connector module
needs to support async operation -- see db_insert_mode parameter for acc
module.
-
http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-8-asynchronous.html
Cheers,
Daniel
Hi,
http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-4-asynchronous-sql.html
I was wondering whether there are any plans of bringing that feature to
the acc module, too. We have seen it in the past that a blocking database
server brought our proxy to a halt because the acc module was blocking,
too. So this could help a lot if the acc entries were written
asynchronously.
Best Regards,
Sebastian
_______________________________________________
--
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla
2014-10-22 14:09:14 UTC
Permalink
Hi Sebastian,
Post by Sebastian Damm
Hi Daniel,
thanks for the explanation and blog post. However, this is a different
approach than the asynchronous sqlops function, right? In sqlops, the
request is sent to an asynchronous worker in Kamailio and does the SQL
operation when possible. In acc, only the request is a different one.
And if the MySQL server really has a problem, it can happen that it
doesn't return from the an INSERT DELAYED query immediately. If the
MySQL query is not detached from the SIP worker, the problem of a
blocking SIP proxy is still there. Is it possible to use the
asynchronous worker for the acc requests, too?
the are two kind of operations that can be enabled for acc: insert
delayed is done when db_insert_mode=1, async insert is done when
db_insert_mode=2.

async insert is done via an asynchronous worker, same mechanism as for
sql_query_async() -- in other words, the insert query to db is not
executed by the sip worker.

Cheers,
Daniel
Post by Sebastian Damm
Best Regards,
Sebastian
On Tue, Oct 21, 2014 at 4:21 PM, Daniel-Constantin Mierla
Hello,
it is possible, with same limitation that the database connector
module needs to support async operation -- see db_insert_mode
parameter for acc module.
-
http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-8-asynchronous.html
Cheers,
Daniel
Post by Sebastian Damm
Hi,
http://by-miconda.blogspot.de/2014/10/kamailio-42-tips-4-asynchronous-sql.html
I was wondering whether there are any plans of bringing that
feature to the acc module, too. We have seen it in the past that
a blocking database server brought our proxy to a halt because
the acc module was blocking, too. So this could help a lot if the
acc entries were written asynchronously.
Best Regards,
Sebastian
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...