Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add websocket session identifier to listen verb websocket headers #965

Open
alex-wirebee opened this issue Nov 10, 2024 · 4 comments
Open

Comments

@alex-wirebee
Copy link

Use case: Have multiple replicas of a websocket server listening for bidirectional streams, connected to from the jambonz listen verb.
A load balancer is used in front of these replicas, and in order for the load balancer to always forward a websocket session to a specific replica (header based session affinity), the websocket headers need to have an id (in this case, call_sid would probably be a good identifier) which the load balancer can map to a replica.

@davehorton
Copy link
Contributor

are you specifically asking for this to be carried in an HTTP custom header ?

@alex-wirebee
Copy link
Author

Yes, I believe that should do it since the load balancer lets me specify which header to use for identifying the session

@davehorton
Copy link
Contributor

why do you care which replica a particular call session websocket connection gets routed to?

@alex-wirebee
Copy link
Author

If the client is connected to replica A and then it connects to replica B, replica B doesn't have the state for the session so the websocket will be closed and then reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants