Multiple IPs for multiple NICs

Hello, does WCS support multiple IP addresses from multiple NICs along with multiple domains on a single VPS/VDS? At the moment anytime I upload an SSL certificate for a new domain - it overwrites the previous one.
Thanks,
P
 

Max

Administrator
Staff member
Hello

Regarding Multiple NICs.
The NIC is used when WCS binds a port for sending or receiving packets via particular protocol.

For example, WebRTC can bind port 31001, 31002, etc.
Websocket can bind port 8443.

There are settings where you can specify what IP (NIC) address will be used for such binding.
rtc_ip_local = 192.168.1.5
ws.address = 192.168.1.5
 

Max

Administrator
Staff member
Regarding multiple domains.

Option 1

Web import does not support multiple SSL certs.
You can try to import two or more SSL certificates using the command line.

For example:
1. Import SSL certificate + private key for domain1.com
2. 1. Import SSL certificate + private key for domain2.com
3. As a result conf/wss.jks file should contain certificates for two domains.
4. Then you can try to connect. i.e.
wss://domain1.com:8443
wss://domain2.com:8443
Both connects should be established.
Please note. We didn't test multi-domain setup. It may do not work at all.

Option 2

If it does not work, you can use Apache or Nginx as reverse proxy and setup multi-domain on your Web server.
I.e.

1. Import SSL certs into your Nginx for domain1.com and domain2.com
As a result your Nginx should respond on two URLs https://domain1.com https://domain2.com

2. Setup reverse proxy for HTTP and for Websocket connection.

Domain1

https://domain1.com:443 > http://localhost:8081
wss://domain1.com:443 > ws://localhost:8080

Domain2

https://domain2.com:443 > http://localhost:8081
wss://domain2.com:443 > ws://localhost:8080
 
Hello

Regarding Multiple NICs.
The NIC is used when WCS binds a port for sending or receiving packets via particular protocol.

For example, WebRTC can bind port 31001, 31002, etc.
Websocket can bind port 8443.

There are settings where you can specify what IP (NIC) address will be used for such binding.
rtc_ip_local = 192.168.1.5
ws.address = 192.168.1.5
Thanks for a reply, in this respect, can we specify

wss.address = 192.168.1.5, 192.168.1.6

so that multiple domains (or subdomains) bound to those IP addresses can all lead to the same server but from different NICs?

e.g. domain0.com -> 192.168.1.5 -> wss://domain0.com:8443/
e.g. domain1.com -> 192.168.1.6 -> wss://domain1.com:8443/

What we are trying to achieve is to expand bandwidth beyond 1 Gbps/NIC by using 2 or more NICs per server.
 

Max

Administrator
Staff member
Thanks for a reply, in this respect, can we specify

wss.address = 192.168.1.5, 192.168.1.6
No, settings for multiple adresses to bind to are not supported. But server is listening for websocket on all interfaces by default:
Code:
wss.address=0.0.0.0
What we are trying to achieve is to expand bandwidth beyond 1 Gbps/NIC by using 2 or more NICs per server.
You should use CDN of two Edge servers in this case wicth 1 Gbps intefrace per each. Please read this doc: CDN 2.0 and this article https://flashphoner.com/dynamic-cdn-for-low-latency-webrtc-streaming/
 

Max

Administrator
Staff member
Thanks for a reply, so, basically, WCS should be used with one NIC/server instance.
Yes. It may work with 2 interfaces, for example, to capture RTSP streams from external network for viewers in internal one, so RTSP stream goes through one NIC and WebRTC stream go through another NIC.
But it can't be configured to balance a network load between two interfaces.
 
Top