"Session does not exist" message with WebRTC playStream

Hi,

I have multiple Origin servers behind Load balancer in AWS. I can able to publish WebRTC stream and when I try to play the stream, I am getting "Session does not exist" error.

When I checked with the logs, it seems publishing happened in one server and playstream got called in another server.

Is there any way to maintain session for those streams?
 

Max

Administrator
Staff member
Good day.
Is there any way to maintain session for those streams?
The only way is to play stream within the same websocket session like Two Way Streaming or Media Devices examples.
In Google Cloud, you can enable stickiness by client IP, in this case balancer should route all the connections from the same IP to the same instance, but this is bad approach for clients behind providers NAT. AWS, however, does not allow this kind of stickiness, so every websockect connection may be routed to another instance.
Also, it's a good practice to publish to Origin and to play from Edge unless you play a strema for some control reasons.
 
Top