<link rel='prefetch'> requests may consume all available sockets |
||||||
Issue descriptionIf a page inserts too many prefetch links, the next navigation can be delayed if all requests go to the same origin. The chrome has a limit for the number of connections to a HTTP/1.1 origin (g_max_sockets_per_group). Currently its value is 6 for normal socket pools. Prefetch requests could occupy all available sockets so the next more important request will have to wait until one of these sockets is free. This can be fixed by restricting the maximum number of simultaneous same-origin prefetches to some value lower than 6.
,
Jul 30
,
Aug 6
,
Aug 17
This problem is not a prefetch specific, right? Also, since the g_max_sockets_per_group is a global limit, even if we have a per-tab simultaneous same-origin prefetch limit, it still can consume all available sockets among multiple-tabs. So, adding such a limit sounds an incomplete and ad-hoc approach to me.
,
Aug 17
,
Aug 29
> This problem is not a prefetch specific, right? It's not. A page might just manually send a bunch of XHR requests to an origin causing the same problem. But we could add special treatment for prefetch requests though. > Also, since the g_max_sockets_per_group is a global limit, even if we have a per-tab simultaneous same-origin prefetch limit, it still can consume all available sockets among multiple-tabs. > > So, adding such a limit sounds an incomplete and ad-hoc approach to me. We could enforce this limit among all tabs, for example at the ResourceScheduler level. Alternatively, we could just stop all prefetch hints after the user initiates any kind of page load. Mozilla claims they do that: https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ#What_happens_if_I_click_on_a_link_while_something_is_being_prefetched.3F
,
Aug 31
,
Dec 17
Prefetch is a speculative fetch (not mandatory) so technically we can surely implement this I suppose (in global way too, the latest architecture allows this). Marking this Available for now, I'd like to get more inputs/signals/feedback before we actually implement this. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by alexilin@chromium.org
, Jul 25