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

Use one websocket per client #231

Open
Archmonger opened this issue Feb 28, 2024 · 0 comments
Open

Use one websocket per client #231

Archmonger opened this issue Feb 28, 2024 · 0 comments

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Feb 28, 2024

Current Situation

The initial handshake of a websocket connection can cause additional latency. It's sometimes more performant to utilize only one websocket connection per client.

Proposed Actions

Refactor consumer.py and our client code to utilize a single websocket per client. Probably will need a SharedReactPyConsumer class

This will likely require changing our websocket's URL routing schema.

We might want to make this option configurable via REACTPY_SHARED_WEBSOCKET, since the old behavior has the potential to be more performant when using multiple ASGI workers.

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

No branches or pull requests

1 participant