Binding the same vhost to multiple IP's

I have an origin/edge deployment in a datacenter that provides public and private IP’s on separate NIC’s. What I’d like to do is have my edges make their repeater connections to the origin over the private IP, as I don’t pay for bandwidth on the private IP.

I’ll still need to bind the origin to a public IP to accept encoder connections, and I’ll need to bind the edges to public IP’s to accept player connections.

Is this configuration possible with Wowza?

Thanks,

Jay

Jay,

Use the priviate IP in .stream files or resolve in StreamNameAlias. On the edge:

file: /content/origin.stream

contents: rtmp://[wowza-private-ip]:1935/liveorigin/livestream

Playback:

Server: rtmp://[wowza-public-ip]:1935/liveedge

Stream: origin.stream

Richard

Charlie suggested you look for an option outside of Wowza Server. There might be a way to use IP tables to control routing. You should be able to control which NIC card traffic flows over based on IP address.

Richard

Thanks Richard, but my setup is slightly more complicated than that.

I have multiple origin servers. The origin host is discovered by the edge via an HTTP request that happens in my onAppStart on the edge, and then I use IApplicationInstance.setRepeaterOriginURL() to set the hostname for the appropriate origin (which works just fine).

This use case is for a CDN, and there’s no way for me to define the stream names or origin servers in advance, so .stream files aren’t a workable solution here, but if I can bind Wowza on the origin servers to both the public and the private IP’s, I should have no problem… I can just set the repeater origin URL to the private ip of the target origin.

Can I bind my Wowza vhost to multiple IP’s using multiple entries in vhost.xml?

Thanks Sander and Richard.

Richard, other than the obvious downside of the need to divide available processor cores amongst the hostport entries, are there specific reasons why this shouldn’t be done at the WMS level? I’ll need to explain the reasons for whatever approach we take to my client.

Thanks,

Jay

To bind to several IP addresses you indeed have to specify several entries in the virtual host configuration. The downside however is that you have to divide available CPU cores between the multiple HostPort entries with the entry.

To be honest I think it’s much simpler than Richard thinks it is.

You can simply bind both your origin and edge server on both public and private IP. On your edge server applications you use the private IP of the origin server for the repeater connections. Your operating system should do all the stuff to decide which NIC will be used.