Load Balancing Janus and Sticky Sessions (Cookie Based Affinity)

Hello,

I have a Janus server behind an Azure App gateway. Everything is working fine. When I add a second instance of Janus behind it, everything fails. If I remove the original backend server, things work fine. I have cookie based affinity set up so that sessions stick to one server but it does not appear to be working.

Does Janus support sticky sessions? Is there somewhere in the Janus config that I sticky sessions can be enabled?

Thank you for any insight you can provide!

Patrick

The Janus API doesn’t use cookies. You may have to use the credentials stuff of XHR requests, if you’re using HTTP. Or just switch to websockets, which will guarantee requests from a specific user all go to the same server.

1 Like