4 ms·
I think this might be an error in the text, HTTP status code 503 can be used for backpressure, which I think is what is being referred too But yes, TCP uses wi
by addisonj 5y ago
I think this might be an error in the text, HTTP status code 503 can be used for backpressure, which I think is what is being referred too
But yes, TCP uses windows for back-pressure, but that isn't really useful for application level backpressure as the OS controls the queues sizes, so pretty much most systems have their own backpressure on top.
- kqr 5y agoIt's useful still! If you have an application that talks to another application on the other side of the world, you get to control how fast it sends you stuff with your reading speed. If you stop reading from the socket, the sending application will stop sending before long. It seems like spooky action at a distance but it's just backpressure propagating through many layers.
- Matthias247 5y agoIt's not that useless. A lot of applications these days are really using HTTP. And in HTTP/1 if you read from a response body from the socket (or write it), you are really already using the backpressure from TCP instead of having anything on top of it. With HTTP/2 and /3 that's different due to mulitplexing of multiple streams on the same socket - in that case there exists the additional flow control windows on top of TCP. These actually make those protocols rather hard to implement correctly.