Hi Olle!

That would be a nice feature, indeed. Also, a nice to have, would be a parameter to limit the number of failover retries. 
For example, say you have HTTP1 and HTTP2 and Kamailio connects to HTTP1 first.
HTTP1 has a failover on HTTP2 and HTTP2 has a failover on HTTP1 . If both HTTP servers are offline, there will be an "infinite" loop between the 2 HTTP servers. Limiting the number of failover retries will limit the failover loop.


Atenciosamente / Kind Regards / Cordialement / Un saludo,


Sérgio Charrua


On Fri, Dec 13, 2024 at 8:25 AM Olle E. Johansson via sr-users <sr-users@lists.kamailio.org> wrote:


On 12 Dec 2024, at 17:48, Social Boh via sr-users <sr-users@lists.kamailio.org> wrote:


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.

The failover option in the connection object is used for failover. As far as I remember (but it was some time ago I wrote that code) there’s no monitoring like we do with OPTIONS for SIP. Guess that can be implemented so that failover happens faster than now.

/O
__________________________________________________________
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!