Can I facilitate Nginx to multiplex an Icecast stream?

2

The headline basically says it, I have Nginx connect as a reverse proxy to one of my Icecast2 streams.

Now it would be nice if, for every new connection to Nginx, it would not proxy a new connection to the Icecast server but rather re-use its already existing (and sole) connection. What I am trying to achieve is that there basically is only one client to the Icecast stream at all, being the reverse proxy. Nginx then should somehow internally connect to itself so my bandwidth doesn't explode with every new listener at the Icecast server per se.

Can it be done?

user654123

Posted 2015-03-24T20:14:25.620

Reputation: 213

Answers

0

I'm not sure, but I don't think Nginx can relay an Icecast stream by itself.

If both servers are on different machines, separated by a network or the Internet, then I'd recommend to set up a second Icecast server as the relay.

Note that Icecast can listen to port 80/443 just fine. On Debian/Ubuntu it needs some modifications though to work correctly.

TBR

Posted 2015-03-24T20:14:25.620

Reputation: 283