Hi @atoppi i am back again with another question. My team is currently working on horizontal scaling of our janus servers with janode as the frontend. From the config.js, there are 3 options: single server, multiple servers with single adress each and multiple servers with multiple addresses. Since connection is controlled by the connection.js in janode, my question is how do i control connection between servers? In other words, the logic to determine when to switch to another server?
Also in terms of AWS Load Balancer, the port url wont work in the config.js and the connection.js since the load balancer already connects to the ec2 instance’s port. How do i make it work?
Any help would be appreciated to push me in the right direction. Thanks
The latter is either a number (that matches an array index) or a string (that matches “server_key”). Your application can decide which server to connect to by setting the “key” param. Once that connection has been tied to that server, Janode can use one of the several urls in the “address” configuration. That means that Janode will basically considers all those urls equivalent for connecting to the server with the specified key/index and will just iterate over those urls whenever it’s needed.
@atoppi I got this one. I tested it and its working great. Thanks. However, when the nodejs app is started, it created only one session and any other user joins that single session making it difficult to scale. What do you suggest i do to separate the sessions for different group of users?
What’s the issue with using a single session?
Anyway it’s up to your node application how many sessions you want to use. You could setup a pool of sessions and then round robin for every new attach request.