Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
You could look to an Anycast example of handling this type of situation: https://github.com/kamailio/kamailio/blob/master/misc/examples/mixed/kamaili...
Regards,
Fred Posner p: +1 (352) 664-3733
On Oct 10, 2023, at 1:09 PM, Alex Balashov via sr-users sr-users@lists.kamailio.org wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
But I should add: do you actually need state? All replies can be routed back based on the content of SIP headers alone -- that is to say, statelessly. Most simple load balancers remain stateless for this very reason.
On 10 Oct 2023, at 13:09, Alex Balashov abalashov@evaristesys.com wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Many thanks. I am afraid I need stateful TM if only for the retransmissions and how to avoid them. The Anycast example will prove very useful. Cheers,
Michel Pelletier
On Tue, Oct 10, 2023 at 11:58 AM Alex Balashov via sr-users < sr-users@lists.kamailio.org> wrote:
But I should add: do you actually need state? All replies can be routed back based on the content of SIP headers alone -- that is to say, statelessly. Most simple load balancers remain stateless for this very reason.
On 10 Oct 2023, at 13:09, Alex Balashov abalashov@evaristesys.com
wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users <
sr-users@lists.kamailio.org> wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have
is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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!
Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
I don't think the anycast example is going to get you out of this problem entirely.
On 10 Oct 2023, at 17:22, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Many thanks. I am afraid I need stateful TM if only for the retransmissions and how to avoid them. The Anycast example will prove very useful. Cheers,
Michel Pelletier
On Tue, Oct 10, 2023 at 11:58 AM Alex Balashov via sr-users sr-users@lists.kamailio.org wrote: But I should add: do you actually need state? All replies can be routed back based on the content of SIP headers alone -- that is to say, statelessly. Most simple load balancers remain stateless for this very reason.
On 10 Oct 2023, at 13:09, Alex Balashov abalashov@evaristesys.com wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
Hi,
I agree. But the example puts me on the right track. It tells me that what I need to do is bounce the reply off to the other nodes(s) if TM doesn't recognize it. Having a DMQ option for the TM module would be great though.
Cheers,
Michel Pelletier
On Tue, Oct 10, 2023 at 4:22 PM Alex Balashov via sr-users < sr-users@lists.kamailio.org> wrote:
I don't think the anycast example is going to get you out of this problem entirely.
On 10 Oct 2023, at 17:22, Michel Pelletier via sr-users <
sr-users@lists.kamailio.org> wrote:
Many thanks. I am afraid I need stateful TM if only for the
retransmissions and how to avoid them. The Anycast example will prove very useful.
Cheers,
Michel Pelletier
On Tue, Oct 10, 2023 at 11:58 AM Alex Balashov via sr-users <
sr-users@lists.kamailio.org> wrote:
But I should add: do you actually need state? All replies can be routed
back based on the content of SIP headers alone -- that is to say, statelessly. Most simple load balancers remain stateless for this very reason.
On 10 Oct 2023, at 13:09, Alex Balashov abalashov@evaristesys.com
wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users <
sr-users@lists.kamailio.org> wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I
have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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!
Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Kamailio - Users Mailing List - Non Commercial Discussions 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!
Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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!
Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
Yes, but this is not helpful if trying to mitigate an outage of the node that actually holds the transaction state.
Unfortunately, from a technical point of view, replicating TM state is not as straightforward as it sounds, or it would have been done already. It's not just a matter of serialising the transaction information and shipping it across and reconstituting it, timers and all. There are hooks deep into other runtime state, connection state, etc. which either aren't exposed for easy deserialisation/hydration, or are not possible to replicate altogether because it would require integration with the OS network stack (e.g. connection info).
All to say, even if such a thing were developed, it would be an extremely flawed and imperfect process, and--perhaps I can take a bit of liberty on behalf of the core development team--the project doesn't like to support half-assed features.
A more stateless, fault-tolerant design is, by comparison, a significantly lower engineering lift in most cases where replicating TM would be useful.
-- Alex
On 11 Oct 2023, at 09:47, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I agree. But the example puts me on the right track. It tells me that what I need to do is bounce the reply off to the other nodes(s) if TM doesn't recognize it. Having a DMQ option for the TM module would be great though.
Cheers,
Michel Pelletier
On Tue, Oct 10, 2023 at 4:22 PM Alex Balashov via sr-users sr-users@lists.kamailio.org wrote: I don't think the anycast example is going to get you out of this problem entirely.
On 10 Oct 2023, at 17:22, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Many thanks. I am afraid I need stateful TM if only for the retransmissions and how to avoid them. The Anycast example will prove very useful. Cheers,
Michel Pelletier
On Tue, Oct 10, 2023 at 11:58 AM Alex Balashov via sr-users sr-users@lists.kamailio.org wrote: But I should add: do you actually need state? All replies can be routed back based on the content of SIP headers alone -- that is to say, statelessly. Most simple load balancers remain stateless for this very reason.
On 10 Oct 2023, at 13:09, Alex Balashov abalashov@evaristesys.com wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800
Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
It would seem the best solution is to use something that can use the SIP protocol for making routing decisions - for example, Kamailio acting as a stateless load balancer, either as a replacement for your load balancer or between your layer4 load balancer (just doing pure round-robin of received packets) and your stateful SIP endpoint. A simple deterministic algorithm (like modulo over a hash of the called) will ensure that a CANCEL will reach the same stateful SIP endpoint as the INVITE.
-----Original Message----- From: Alex Balashov via sr-users sr-users@lists.kamailio.org Sent: Tuesday, October 10, 2023 12:31 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Alex Balashov abalashov@evaristesys.com Subject: [SR-Users] Re: Using DMQ to sync the TM module.
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
But I should add: do you actually need state? All replies can be routed back based on the content of SIP headers alone -- that is to say, statelessly. Most simple load balancers remain stateless for this very reason.
On 10 Oct 2023, at 13:09, Alex Balashov abalashov@evaristesys.com wrote:
There is not.
On 10 Oct 2023, at 12:50, Michel Pelletier via sr-users sr-users@lists.kamailio.org wrote:
Hi,
I have 2 kamailio instances behind a load balancer. The problem I have is that the load balancer can only track TCP connections, but not UDP. So one Kamailio instance might send a request using UDP, while the corresponding UDP reply arrives on the other. This doesn't play well with the (stateful) TM module. Is there a way to synchronize the TM module accross Kamailio instances using DMQ?
Cheers,
Michel Pelletier __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evar/ istesys.com%2F&data=05%7C01%7Cbkaufman%40bcmone.com%7Ce635413347124b00 36fc08dbc9b7857f%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C63832556 2303100216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6GfRy1N%2BIYEob% 2FXoMnrfBnWUYQePN6SJVCRYuV6czPQ%3D&reserved=0 Tel: +1-706-510-6800
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com/ Tel: +1-706-510-6800
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: