Feasibility of rtpengine located behind a HAProxy UDP Balancer

34 views
Skip to first unread message

Denys Pozniak

unread,
Dec 1, 2025, 5:54:43 AM12/1/25
to Sipwise rtpengine
Hello,

I am reaching out to see if anyone in the community has experience or insights regarding the feasibility of placing rtpengine behind a HAProxy UDP load balancer.
I understand that balancing RTP/UDP traffic in this way is generally not a conventional or ideal setup, but I am exploring this possibility for our architecture.

The core issue is related to maintaining the original client IP address when traffic is passed through the balancer. For a proper media session, rtpengine needs to know the true source IP and port of the upstream client for correct routing and security.

I am looking for a mechanism similar to what Kamailio has for SIP/TCP based traffic (tcp_accept_haproxy=yes).

Does rtpengine have a built-in or configurable feature to accept and parse the PROXY protocol header on UDP traffic?

For reference, the PROXY protocol specification is available here: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt


Thank you in advance for your help.
udp_lb.png

Richard Fuchs

unread,
Jan 19, 2026, 7:31:27 AMJan 19
to rtpe...@googlegroups.com
On 01/12/2025 06.54, Denys Pozniak wrote:
> I am reaching out to see if anyone in the community has experience or
> insights regarding the feasibility of placing rtpengine behind a
> HAProxy UDP load balancer.
> I understand that balancing RTP/UDP traffic in this way is generally
> not a conventional or ideal setup, but I am exploring this possibility
> for our architecture.
>
> The core issue is related to maintaining the original client IP
> address when traffic is passed through the balancer. For a proper
> media session, rtpengine needs to know the true source IP and port of
> the upstream client for correct routing and security.
>
> I am looking for a mechanism similar to what Kamailio has for SIP/TCP
> based traffic (tcp_accept_haproxy=yes).
>
> Does rtpengine have a built-in or configurable feature to accept and
> parse the PROXY protocol header on UDP traffic?

There is no support for this currently, and a quick Google tells me that
UDP load balancing is only available for the enterprise edition HAproxy,
so this could only be implemented blindly based on the specs.

Are you thinking of just the control connections, or are you thinking of
passing the RTP media itself through HAproxy?

With UDP being connectionless, how would the reverse direction work?

Cheers

Denys Pozniak

unread,
Jan 19, 2026, 7:36:21 AMJan 19
to Sipwise rtpengine
Hey!
> Are you thinking of just the control connections, or are you thinking of
passing the RTP media itself through HAproxy? 

There was an idea to place RTPengine behind Cloudflare Spectrum for proxying RTP
понедельник, 19 января 2026 г. в 13:31:27 UTC+1, rfuchs:
Reply all
Reply to author
Forward
0 new messages