On Thu, Aug 27, 2020 at 05:39:34PM +0200, Tim Düsterhus, WoltLab GmbH wrote: > Willy and I discussed this in private. My understanding is that this > issue is caused by an inherent limitation of H2 with regard to head of > the line blocking. > > In simple terms: > > If the stuff at the beginning of the the backend connection belongs to a > client that is very slowly or not reading the stuff within its client > connection then everything that's within that backend connection will > stall until the slow client finally gets around to reading the stuff > thats intended for it. > > Basically a very slow client can block *other* clients that are > unfortunate and share the backend connection.
And in order to complete this, one theorical workaround would consist in using very small initial windows, but that would not be practical. A test just with the buffer size didn't help. > Our resolution is simple: We disable H2 for the backend connections and > use good old H1. We don't *need* end to end H2. Also that raised an idea about adding a new "http-reuse" mode or slightly changing the way "never" works for H2, which would consist in only grouping together requests from the same session (client connection). It would be what "never" already does, except that after the last response, instead of closing the connection, it would be sent back to the idle pool for any other client to use. It would not be perfect but would keep streams in the same order for a given client based on their performance. Willy

