Disable http fallback after successful websocket connection#10395
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. |
|
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
allowedproperty on the fallback options tofalseonce a websocket connection has been established.How to test
Review checklist
Reminder for reviewers