Why is Chrome queueing up requests when using HTTP/2?
Asked Answered
F

0

17

I have a site that is using HTTP/2, and the site is slow to load images. Looking at Chrome's Devtools, most of the time is spent in "queueing" the network requests for the images. My understanding is that with HTTP/2, multiple requests may be made simultaneously over the same TCP connection, but I am seeing that Chrome is only issuing 6 requests simultaneously and queueing the rest (as if it were using HTTP/1.1). I know that it is using HTTP/2 since the "protocol" column in the "Network" tab says "h2".

Why is Chrome queueing up these requests instead of sending them in parallel?

enter image description here

Fatuous answered 25/7, 2017 at 23:50 Comment(9)
Servers may not appreciate receiving a bajillion image requests all at once.Deglutition
Also, making a bajillion image requests in parallel isn't guaranteed to make things any faster, and it could even increase perceived or actual loading times.Deglutition
This is just around 20 image requests; doesn't seem like very much to me. Besides, whether or not it's better to issue the requests in parallel is secondary; I can't measure whether parallel is better or not anyway, since the requests are not being made in parallel. One of the big benefits of HTTP/2 is multiplexing many requests over a single TCP connection, and that doesn't seem to be happening here.Fatuous
what's the server url?Diestock
@Diestock the server URL is umoda.io/shop.Fatuous
Sorry for the late response – how are you requesting the images? If they're fetched via JavaScript, Chrome maybe isn't able to parallelize the requests.Osrick
@Fatuous Did you ever figure out the root cause? I have a similar issue on http2 and can't figure out the queueing cause as well.Alwitt
@Fatuous are you sure that everything is OK from server side? I mean parallel requests limit, etc. Also this answer might be helpful for you: https://mcmap.net/q/747121/-why-the-requests-in-chrome-debugger-still-queueing-as-the-http2-protocol-has-been-enabledKolomna
I can see only 5 images being queued at the same time. Once one of them has completed, a new one is queued and so on. No issueShanklin

© 2022 - 2024 — McMap. All rights reserved.