I'm not arguing that Kamailio's http processing is equal or better than its SIP processing. There's a variety of reasons why it's not.  I'm arguing that http requests can be done sanely, and you're saying they shouldn't be done at all.  

Kaufman
Senior Voice Engineer



E: bkaufman@bcmone.com




 

SIP.US Client Support: 800.566.9810  |  SIPTRUNK Client Support: 800.250.6510  |  Flowroute Client Support: 855.356.9768

img
img
img
 


From: Alex Balashov via sr-users <sr-users@lists.kamailio.org>
Sent: Thursday, December 19, 2024 11:54 AM
To: sr-users@lists.kamailio.org <sr-users@lists.kamailio.org>
Cc: Alex Balashov <abalashov@evaristesys.com>
Subject: [SR-Users] Re: Kamailio not receiving packets on high CPS
 
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


> On Dec 19, 2024, at 12:41 pm, Ben Kaufman <bkaufman@bcmone.com> wrote:
>
> Unless I'm wrong (and testing shows this to be the case), http_async_client will send an http request, store the request to memory, and release the process. As long as there is no http reply, there is no blocked process.  Only when a reply is received is the SIP request processing resumed.

The query is initiated by a delegate as well:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Fblob%2Fmaster%2Fsrc%2Fmodules%2Fhttp_async_client%2Fasync_http.c%23L631&data=05%7C02%7Cbkaufman%40bcmone.com%7C4a22072007dc49f905eb08dd2056c88c%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C638702279295109386%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=WWTWTjG0igDtfMGaaiPweeT3BU7Ixzy2zkgsnfBi%2BZk%3D&reserved=0

But you are correct that there's a libevent loop that prevents these from blocking while waiting for a response.

These questions of mechanics don't change the argument about the limited benefit of async processing, IMHO. The question is more fundamental and isn't really related to Kamailio per se. There's only so much work a system can do, and HTTP is intensive and slow. Run the queries here, run them there, there are better and worse ways to do it, but this doesn't change the broader picture.

Think of it this way: you get 2000 CPS and a modestly-resourced Kamailio system. You build your call processing architecture with http_async_client. I build mine without doing HTTP queries at all. Then, we measure units of throughput per cloud resource spend. Who do you think wins?

-- Alex

--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fevaristesys.com%2F&data=05%7C02%7Cbkaufman%40bcmone.com%7C4a22072007dc49f905eb08dd2056c88c%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C638702279295127899%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=58vSk0R3ZL2tg5BN%2Fyu9iFeW4mCYxTpfAkX8Pkkk%2Fj8%3D&reserved=0
Tel: +1-706-510-6800

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!