Hello,
maybe having a HTTP servers cluster using HA so each query from Kamailio
always find a active server
Other option is using:
modparam("http_client", "timeout_mode", 2) #Timeout values are in
milliseconds
modparam("http_client", "connection_timeout", 100)
Regards
---
I'm SoCIaL, MayBe
El 12/12/2024 a las 11:07 a. m., Sergio Charrua via sr-users escribió:
Hello all!
For a STSH project, kamailio is making HTTP requests to a
middleware (REST API) using HTTP_CLIENT module.
I have set the parameter "timeout" to 2 second, but this increases PDD
to too high levels, so I have set it to 1 second. Problem is that 1sec
is also too high!
The parameter only accepts integer values, so no way to set this to
0.5sec.
I thought of having a way for kamailio to be aware that HTTP node #1
is down, so next request it will use HTTP node #2 instead. And once in
a while, say, every 60 seconds, kamailio would check status of HTTP
node #1 and, if OK, then it will switch back to HTTP node #1 and
failover to node #2 when required.
The HTTP_CLIENT, as far as I know, doesn't do that. So the question
is: what would be the best approach to have this feature on Kamailio?
i thought about using HTable and have a flag with value of the HTTP
connection to use by default. At worst, only the 1st failover request
would take 1 or 2 seconds to timeout....then the subsequent HTTP
requests would use node #2.
Any ideas?
Atenciosamente / Kind Regards / Cordialement / Un saludo,
*
*
*Sérgio Charrua*
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
--sr-users(a)lists.kamailio.org
To unsubscribe send an email tosr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!