-
Notifications
You must be signed in to change notification settings - Fork 98
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
Support WebSockets in LiteFS Proxy #427
Comments
@patte I added a PR (superfly/docs#1342) to document the WebSockets limitation. The tricky thing about supporting WebSockets is that messages don't have traditional HTTP verbs that indicate a read-only request versus read/write request so it's hard to know what to proxy. |
Thank you for updating the docs! |
Until this is solved, how to proxy secure websocket requests to my application? ( |
I successfully tested litefs on fly.io, but it seems that websocket connections are not working though the proxy.
The ws GET request arrives at the proxy, it gets proxied to the backend and in the browser I see a
101 Switching Protocols
with the response headers and size 0. No messages are received. When I try to send a message from the browser the connection gets closed (Connection Closed: 1006).When I expose the backend port directly (so not going through the litefs proxy) everything works.
While writing this I found this thread in the forum, which seems to confirm that ws is not supported. It would be nice if this limitation is documented: Either litefs (with proxy) or websockets for one fly app.
Could I use litefs without the proxy and
fly-replay
write requests myself? How would I know if the local sqlitedb is synced up? I'd also be up to try to "fix" ws proxying in litefs if you think that would be a good idea to have and don't see any big roadblocks.The text was updated successfully, but these errors were encountered: