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

Switch to QUIC for streaming endpoints #225

Open
jbearer opened this issue May 28, 2024 · 0 comments
Open

Switch to QUIC for streaming endpoints #225

jbearer opened this issue May 28, 2024 · 0 comments

Comments

@jbearer
Copy link
Member

jbearer commented May 28, 2024

WebSockets have a fundamental flaw: there is no way for a client to apply back pressure when a server is writing faster than the client can read. This leads to numerous issue:

  • The server has no signal when the client is ready to receive new data, so it must simply send data as fast as possible. This leads to often unnecessarily high resource utilization on the server
  • The client must continuously read from the websocket stream in order to handle PING frames, which are sent in band. This means that it must buffer all DATA frames it sees until the application is ready to handle them, leading to escalating memory usage when the application is busy with other tasks
  • A client cannot protect itself from a server writing much faster than it is able to read

QUIC includes flow control to prevent all of these problems. In addition, it is just a newer, more efficient protocol.

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