We're using Kamailio as a stateless load balancer, and would like to add failover support. Is it possible to have failover support in stateless mode? What i want is that when a server doesn't answer to a request, Kamailio set its state to probing, and start to ping it until it answer, then setting its state to active again. And that only active servers are selected by ds_select_dst(). Is it possible? How can I do this?
Thank you.
Santiago
I believe that is the default functionality of the Dispatcher module. I am not sure Dispatcher has anything to do with whether or not you are using the TM module...
On Wed, Mar 10, 2010 at 3:02 PM, Santiago Soares santiagosoares@gmail.com wrote:
We're using Kamailio as a stateless load balancer, and would like to add failover support. Is it possible to have failover support in stateless mode? What i want is that when a server doesn't answer to a request, Kamailio set its state to probing, and start to ping it until it answer, then setting its state to active again. And that only active servers are selected by ds_select_dst(). Is it possible? How can I do this?
Thank you.
Santiago
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
First of all, sorry for my bad english... :)
This thread:
http://www.openser.org/pipermail/users/2006-June/005012.html
says I can't use forward(), for failover, I have to use t_relay, which means that the server must be statefull. But the thing is, i wouldn't like to maintain transactions state in the server, due to the high memory usage. Is it true? Can't I have failover support with forward()?
Santiago Soares Fone: (41) 8488-0537
On Thu, Mar 11, 2010 at 11:33 AM, Geoffrey Mina geoffreymina@gmail.com wrote:
I believe that is the default functionality of the Dispatcher module. I am not sure Dispatcher has anything to do with whether or not you are using the TM module...
On Wed, Mar 10, 2010 at 3:02 PM, Santiago Soares santiagosoares@gmail.com wrote:
We're using Kamailio as a stateless load balancer, and would like to add failover support. Is it possible to have failover support in stateless mode? What i want is that when a server doesn't answer to a request, Kamailio set its state to probing, and start to ping it until it answer, then setting its state to active again. And that only active servers are selected by ds_select_dst(). Is it possible? How can I do this?
Thank you.
Santiago
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
2010/3/11 Santiago Soares santiagosoares@gmail.com:
says I can't use forward(), for failover, I have to use t_relay, which means that the server must be statefull. But the thing is, i wouldn't like to maintain transactions state in the server, due to the high memory usage. Is it true? Can't I have failover support with forward()?
If yoou want Kamailio to perform failover you need it to be transaction stateful, if not Kamailio has no information about hte request when it receives a 500/503 so can not dispatch it to other server (failover).
Load balancing is possible in stateless mode as it just involves sending the requests to different servers randomly.
Also, are you sure you need it to be stateless? TM performance is very good and it's mostly used.
Hello,
On 03/11/2010 10:11 PM, Iñaki Baz Castillo wrote:
2010/3/11 Santiago Soaressantiagosoares@gmail.com:
says I can't use forward(), for failover, I have to use t_relay, which means that the server must be statefull. But the thing is, i wouldn't like to maintain transactions state in the server, due to the high memory usage. Is it true? Can't I have failover support with forward()?
If yoou want Kamailio to perform failover you need it to be transaction stateful, if not Kamailio has no information about hte request when it receives a 500/503 so can not dispatch it to other server (failover).
Load balancing is possible in stateless mode as it just involves sending the requests to different servers randomly.
Also, are you sure you need it to be stateless? TM performance is very good and it's mostly used.
just to confirm what Inaki says that you need tm for doing failover and give you a bit more insights to understand why.
In stateless mode, the sip message is received, processed via config (e.g., in your case select a destination), relayed and completely forgotten. Reply comes, the sip router takes the Via header stack and routes it to origin. Nothing exists about the SIP request in sip router when the reply is processed.
In stateful mode, the initial request is saved in memory, when the reply comes it, tm module matches what is the corresponding request. If the reply code was negative, via failure_route you can get the initial request back for processing and re-send it to new destination.
The performances of tm are very good, with latest 3.0 one more time improved a lot.
Also note that transaction means "request to final reply", not "beginning of call to end of call". So memory is used from the moment the initial invite comes in until the call is answered, canceled or time-out. During the time call is active, no memory is consumed.
Cheers, Daniel