How to setup load balancing?

rp.exch

New Member
Hi,

I want to setup load balancing for flashphoner. Can you help me with how to setup both server?

I have 1 server right now and it is working fine. But my user base is increasing so i have 2 options:
1. Go for high configuration hardware(Might be i get limitations here)
2. Apply load balancing.

I would like to go with load balancing. How to setup 2nd server and what configurations i need to do in both server.

I have 1 source which is pointing stream to server1 and stream name is "demo_stream". I need solution like when user is connecting for the stream it should automatically connect to the server which is less loaded users.

So i can serve more users at a time.

Thanks...
 

rp.exch

New Member
Hi,
You mean it will balance stream name wise. Means stream1 is on server1 then stream2 will be shift to server2. But i want to load balance of viewers for same stream.
 

Max

Administrator
Staff member
There is no difference.

Either if you balance publishers or players, the Publisher or Player should establish Websocket connection first (i.e. when you connect to wss://demo.flashphoner.com:8443). This is the point of balancing.

Flow:

Publish
1. Establish Websocket connection to LB > to server1 or server2 behind LB
2. Establish WebRTC publish session with server1 or server2 directly.

Play
1. Establish Websocket connection to LB > to server1 or server2 behind LB
2. Establish WebRTC playback session with server1 or server2 directly.
 
Top