Given a simple workflow where only one HTTP query is involved, I would recommend the async module. It's very straightforward to make the query out of the main request route, and pack the response into a 3xx redirect and send it out the door in the async reply route.

I've had to mix both modules in situations where there's a pipeline of HTTP requests -- what a pain.

I'm not sure of your request volumes, but I would set these to a relatively high number, e.g. 3x-4x the number of SIP children= processes you have.

https://kamailio.org/docs/modules/5.4.x/modules/http_async_client.html#idm55

-- Alex

On 12/14/20 3:35 PM, Ali Taher wrote:
What do you recommend using : http sync or async client modules?

-----Original Message-----
From: sr-users <[email protected]> On Behalf Of Alex Balashov
Sent: Monday, December 14, 2020 10:31 PM
To: [email protected]
Subject: Re: [SR-Users] voltdb support

On 12/14/20 3:28 PM, Ali Taher wrote:

What I need is to fetch routing from VoltDB and send it back to switch
using 3xx response. So I think the API solution is the best approach
here. Thanks for all this useful info. >

If Kamailio is sending the 3xx response, then it sounds like using the HTTP 
modules to interact with VoltDB's JSON interface might be the best way to go.

You'll have to account for the latency inherent in such queries and make sure 
you have a sufficient number of worker processes to handle the load, whether 
you use the async or synchronous HTTP modules. For more information on that 
topic, you can read an old blog post of mine:

http://www.evaristesys.com/blog/tuning-kamailio-for-high-throughput-and-performance/

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to