Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to LIMIT concurrent (parallel) browser requests in Chrome?

Background

I've noticed that almost all proxy providers have the concept of "Maximum threads" allowed, which from my understanding means maximum number of concurrent/parallel browser requests at a time. Since a modern website can have many parallel requests, how can I put a limit in Chrome on parallel requests (globally for the entire browser, not only per host/server, but for all of them combined)?

Example

Website A is getting resources from its own domain, and besides that uses 9 CDNs and 10 trackers. Let's say Chrome has max 6 concurrent requests / domain, so that's 120 concurrent requests. Anything above this has to wait its turn. I would like to limit this to a maximum of 10 for example.

Notes

I've seen that in Firefox it can be done with 'network.http.max-connections' but I didn't manage to find anything for Chrome or Chromium.

I'm using Selenium and ChromeDriver (C#) to launch the browser, if it helps.

like image 263
Code Avatar asked May 03 '19 16:05

Code


People also ask

How many parallel requests can chrome handle?

By default each Cloud Run container instance can receive up to 80 requests at the same time; you can increase this to a maximum of 1000. Although you should use the default value, if needed you can lower the maximum concurrency. For example, if your code cannot process parallel requests, set concurrency to 1 .

How many concurrent requests can a browser make?

While many do not realize this, there is in fact a limit on the number of parallel connections that a browser can make to the same host. So depending on what browser is used, the limit on the number of connections per host will range anywhere from 2 to 13, with a maximum number of connections ranging up to 60.

Can you configure your browser to open multiple simultaneous connections to a website?

Yes, you can configure many browsers to open multiple simultaneous connections to a Web site. The advantage is that you will you potentially download the file faster.


1 Answers

after some digging and searching i found out that for Chromium Many of network tune parameters are in ClientSocketPoolManager check lines : 29 and 46, So i think You will need to rebuild your own custom Chrome with your preferred parameter rather than be able to dynamically tune them.

like image 87
Asmoun Avatar answered Sep 21 '22 09:09

Asmoun