Running Streamlit without using Websocket?

Is it possible to run Streamlit without using Websocket e.g. by changing configuration?

My problem is that the reverse proxy in my company does not allow Websocket (or is not set up for Websocket).

Streamlit fundamentally runs on websocket so probably not. I would assume you would have to fork the repo and do some changes to that which doesn’t sound very trivial imo.

Hi @willhuang can you please elaborate on “Streamlit fundamentally runs on websocket”?

Similar to the OP, I am in a corporate environment and need to run behind a reverse proxy that does not (for the time being) support Websocket.

If Streamlit fundamentally runs on websocket, why does the server.enableWebsocketCompression option exist?

Does setting server.enableWebsocketCompression=false not turn off websocket completely?

Internally Streamlit uses tornado as its webserver: we have a single tornado instance that’s serving all our HTTP traffic, which includes websocket traffic. Se basically support HTTP traffic AND websocket traffic on a single tornado instance and that’s why “Streamlit fundamentally runs on websocket”.

EnablingWebsocketCompression will not turn off websocket but just compress the messages if I had to guess (Compression - websockets 10.4 documentation).

1 Like

Perhaps stlite can support your use case?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.