3

Scenario: I am running a rest server(nghttp2) with two APIs with 4 threads.

  1. /something : takes some time to process
  2. /anything : takes no time to process

Now, in the client side I am creating one session(which is essentially one TCP connection) and making two async requests, first to /something and next to /anything consecutively. The behavior I notice is that server doesn't process the second request until the the first one is finished. In the packet capture I can see nice implementation of HTTP2 multiplexing. But isn't this head of line blocking? Or is it that my expectation that the requests should be processed parallely rather in a interleaving fashion even if they are from the same TCP connection is wrong?

Note: If I create two different session or TCP connection for each request then they are processed parallely.

Avik Dutta
  • 177
  • 9
  • 1
    Seems like a bug in nghttp2 because there is no point in having http2 if this problem persists. There is generally called Head of Line Blocking which is claimed to be solved in HTTP/2. – Pankaj Goyal Apr 16 '18 at 12:22

0 Answers0