-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Disable http fallback after successful websocket connection #10395
Conversation
I feel like this HTTP fallback depends on where/how a Theia instance is deployed, and as such I'm wondering if it's a good idea to always fallback to it? Assuming a WebSocket connection is supposed to work, is it a good idea to try to use HTTP if that fails? I'm thinking that we could have an option like |
@paul-marechal Well yes, but also no. It depends more on the network configuration of the user. The main use case for the http fallback is for users in heavily firewalled corporate environments where websockets are blocked. The ones responsible for the deployment don't really know, whether their users will be restricted to http only.
I'm not really in favor of that, since the long polling option is considerably slower in a lot of cases, where a lot of data is send between the clients. Instead, I would change the default implementation to prevent using the http fallback solution. Downstream users would have to explicitly enable the option. WDYT? |
I understand now, you are right. We can keep the HTTP fallback and forget about making it configurable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
But this got me thinking about what we do with this WebSocket multiplexing and HTTP fallback, is there any advantage to doing it ourselves over using https://socket.io/ ?
|
There isn't, I just didn't know about socket.io so far. I will create an issue for that and try integrating it into Theia when I have some time for that. |
What it does
Closes #10261
Simply disables the fallback by setting the
allowed
property on the fallback options tofalse
once a websocket connection has been established.How to test
Review checklist
Reminder for reviewers