Scaling Erizo Controller - hostname config

Hello, all,

My company is working on a Licode deployment that we want to make highly available. It’s currently deployed in Kubernetes, and so far it seems to work well as long as we only have a single instance each of Nuve, Controller, and Agent.

We want to run multiple instances of Controller and Agent, and doing so in Kubernetes is easy – we just tell it to run more than one replica of each and it’ll automatically start them. Now, the problem lies in the fact that once we do that we cannot connect to a specific Controller deterministically; all Controller replicas share the same node port, and Kubernetes will route to a random Controller. This we know won’t work.

In looking at the code I see that the Controller configuration takes a hostname parameter via the configuration file licode_config.js. I assume that the Controller uses this to identify itself. I imagine that if we could address each Controller by hostname then connections to specific Controllers could be established instead of the way Kubernetes handles things.

My question then are: Does the Controller identify itself to Nuve using the hostname provided in the configuration file? Does Nuve then use this hostname to refer clients to the appropriate Controller? Do the Agents work similarly?

Thanks in advance,

Carlos

Hi, we also migrating to kubernetes right now and faced with same problems.
As I know, when new client try to join room, Nuve answered with nuveId, which contains url to specific controller.
Each controller when starts, it “registers” itself in Nuve, so when new participant joins, Nuve decide which Controller to use. (not sure, but probably by round robin)
And I think you are right about hostnames of ErizoControllers, at least comments in config file confirm that:
// This configuration is used by the clients to reach erizoController
// Use ‘’ to use the public IP address instead of a hostname
config.erizoController.hostname = ‘’; //default value: ‘’
config.erizoController.port = 8080; //default value: 8080
About agents, it is a bit different, all of them has own IpAdress which they put into ice-candidates in SDP. So, client connects to them by this information.

In theory it is clear. For us the biggest challenge is to expose range of udp ports of ErizoJS to the world.
Did you solve it? Can you advice something ?

Thanks!