# Reverse proxy

**URL:** <https://mediasoup.discourse.group/t/reverse-proxy/6305>\
**Category:** Integration\
**Created:** [October 20, 2024, 4:33pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305 "2024-10-20T16:33:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mactovish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/mactovish/32/2522_2.png) [@mactovish](https://mediasoup.discourse.group/u/mactovish)\
**Post date:** [October 20, 2024, 4:33pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/1 "2024-10-20T16:33:21Z")

</div>

In case of reverse proxy, what should be announce IP in server code  
should it my original server IP or reverse proxy server ip

---

<div class="post-metadata">

**Author:** ![mactovish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/mactovish/32/2522_2.png) [@mactovish](https://mediasoup.discourse.group/u/mactovish)\
**Post date:** [October 20, 2024, 4:58pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/2 "2024-10-20T16:58:09Z")

</div>

I think it should be that of the origin server, but just to be sure

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [October 20, 2024, 5:07pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/3 "2024-10-20T17:07:43Z")

</div>

mediasoup is not an http server.

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [October 20, 2024, 11:23pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/4 "2024-10-20T23:23:24Z")

</div>

You should stop proxying RTP traffic altogether. It’s not ideal or necessary for media streams like RTP in WebRTC, as it introduces unnecessary latency, breaks encryption, and disrupts the peer-to-peer architecture. Instead, use proper WebRTC signaling and, if needed, a TURN server to handle relaying in restricted network conditions.

---

<div class="post-metadata">

**Author:** ![mactovish](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/mactovish/32/2522_2.png) [@mactovish](https://mediasoup.discourse.group/u/mactovish)\
**Post date:** [October 22, 2024, 4:09pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/5 "2024-10-22T16:09:38Z")

</div>

HI Thank you for your responses. Let me brief you the entire structure.  
I have a http server that is built with socket io, node… where I have media soup server library to create router , transports and producers and consumers.

This server lies behind a reverse proxy. I had to this for SSL certificate as i have multiple servers on multiple ec2 instances, or else chrome wont allow microphone access.

I set the announce IP as the main server IP  
All the signalling communication happens via the reverse proxy.

And it is working fine.

---

<div class="post-metadata">

**Author:** ![mik](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mik](https://mediasoup.discourse.group/u/mik)\
**Post date:** [October 28, 2024, 7:28pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/6 "2024-10-28T19:28:19Z")

</div>

@mactovish how did you manage know where to distribute the traffic, you said you have multipule mediasoup servers and a proxy in-front of them, how do you know which traffic is going to which server?

---

<div class="post-metadata">

**Author:** ![piranna](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/piranna/32/934_2.png) [@piranna](https://mediasoup.discourse.group/u/piranna)\
**Post date:** [December 26, 2024, 3:41pm UTC](https://mediasoup.discourse.group/t/reverse-proxy/6305/7 "2024-12-26T15:41:41Z")

</div>

> [@BronzedBroth](#):
>
> Instead, use proper WebRTC signaling and, if needed, a TURN server to handle relaying in restricted network conditions.

Can a TURN server work as a RTP reverse proxy when using WebRtcServer in Mediasoup? It’s said, have a single port outside, but multiple Mediasoup instances inside…
