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