No videos when ErizoJS instances are started in quick succession

Hi,

We’ve run into a problem when publishers connect simultaneously. The
publishers wouldn’t connect with their assigned erizoJS instances.

What happens? The erizoAgent uses all available pre-run erizoJS instances
and starts new erizoJS instances. The problem is that each erizoJS instance
needs a moment - for us about 200 ms - to register with rabbitmq and be
able to receive messages. In this time the publisher already attempts to
connect to the erizoJS instance and fails.

How to fix it? What we added was a callback from the erizoJS instance to
the erizoAgent when the erizoJS instance was ready. The agent waits until
the erizoJS instance is ready before sending the erizo_id to the controller.

The complication? The erizoJS instance needs to be able to access a
specific agent. Our agent balancing already allows this, since each agent
has a unique id. It would also work - with minor adjustments - for setups
with just one erizoAgent. But it’s not immediately applicable for all
Licode scenarios.

Take a look at the solution here:
https://github.com/K-GmbH/licode/commit/28e7c7c5cb386dfe5890912a3593c33f6a6e8db8

As mentioned, we implemented the fix with our specific agent balancing in
mind. This allowed us to establish contact between the erizoJS instances
and the agents. A general fix would have to find an alternative.

The solution also allows pre-run processes to be set to 0. It also enables
us to start a new erizoJS process for each publisher - activated by setting
the maxprocesses to -1.

Best regards,

-Daniel

Hi Daniel,

many thanks, you are right. We will study your solution and try to adapt it
for the general Licode scenario. Very interesting!!

Best,
Álvaro2015-01-14 14:35 GMT+01:00 Daniel Krax danielkrax@gmail.com:

Hi,

We’ve run into a problem when publishers connect simultaneously. The
publishers wouldn’t connect with their assigned erizoJS instances.

What happens? The erizoAgent uses all available pre-run erizoJS instances
and starts new erizoJS instances. The problem is that each erizoJS instance
needs a moment - for us about 200 ms - to register with rabbitmq and be
able to receive messages. In this time the publisher already attempts to
connect to the erizoJS instance and fails.

How to fix it? What we added was a callback from the erizoJS instance to
the erizoAgent when the erizoJS instance was ready. The agent waits until
the erizoJS instance is ready before sending the erizo_id to the controller.

The complication? The erizoJS instance needs to be able to access a
specific agent. Our agent balancing already allows this, since each agent
has a unique id. It would also work - with minor adjustments - for setups
with just one erizoAgent. But it’s not immediately applicable for all
Licode scenarios.

Take a look at the solution here:

enabled erizoJS to be created and used immediately, preventing unreli… · K-GmbH/licode@28e7c7c · GitHub

As mentioned, we implemented the fix with our specific agent balancing in
mind. This allowed us to establish contact between the erizoJS instances
and the agents. A general fix would have to find an alternative.

The solution also allows pre-run processes to be set to 0. It also enables
us to start a new erizoJS process for each publisher - activated by setting
the maxprocesses to -1.

Best regards,

-Daniel


You received this message because you are subscribed to the Google Groups
“lynckia” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lynckia+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.