13

I have read limitation on concurrent ajax requests to a particular domain from chrome browser to be 6. Earlier I had tested and confirmed that. But now I see that even 100 requests are getting sent to the server from chrome browser concurrently and all are active at the same time. Refer screenshot Can someone guide if something has changed. I use chrome 72. I can assure you that the calls have indeed hit the server as I can see the required Database entries corresponding to the call. But earlier these calls would be in waiting mode until some previous call finished.

Update Some additional observations may or may not be relevant. I tested this with 2 servers - 1 has IIS 10 and this limitation is not seen. The other has IIS 8 where I can see that only 6 are sent to server at a time.

ckv
  • 10,539
  • 20
  • 100
  • 144
  • am sure these are not concurrent and they might be starting a few ms apart – Mr. Alien Mar 08 '19 at 04:25
  • @Mr.Alien Few ms is fine. But that is not the question. If browser allows only a limited concurrent connections then the call should not hit server until some previous call returns. I am pretty sure I had seen that behaviour few weeks back but not able to see now. – ckv Mar 08 '19 at 04:56
  • Could you share how you did the test? – hashedram Mar 08 '19 at 06:45
  • Does the server supports HTTP2? If so you are seeing all requests being processed in a single connection, read [this](https://stackoverflow.com/q/36835972/9276329). – Munim Munna Mar 08 '19 at 06:47
  • @MunimMunna: How can we verify if the requests are processed in a single connection or not? – ckv Mar 08 '19 at 07:56
  • 1
    Look at the protocol column in network tab, it should say `h2` or `http1.1`, if the column is not there right click on column headers to enable it. – Munim Munna Mar 08 '19 at 08:15
  • @MunimMunna; Thanks. It says http/1.1 only. – ckv Mar 08 '19 at 08:56
  • @MunimMunna Also see my update test results in the question. – ckv Mar 08 '19 at 09:12

2 Answers2

13

This behaviour has not been changed for HTTP/1.1.

You can get more clear picture if you enable the WaterFall. If you see the waterfall, at one point of time only 6 request will get fired(sent to server) and rest all will be in pending mode.

Note, request with status "Pending" appearing in the network tab doesn't mean that the request is sent to the server.

Following is the screenshot from Version 74.0.3726.0

enter image description here

PSK
  • 17,547
  • 5
  • 32
  • 43
  • 1
    I'm using the h2 (Http/2.0) protocol but still only getting 6 ajax requests to send at once. Any idea why? – LPQ Apr 08 '20 at 10:33
  • @LPQ probably that server limits number of simultaneous requests via `SETTINGS_MAX_CONCURRENT_STREAMS` https://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_CONCURRENT_STREAMS – Maksim Shamihulau May 17 '22 at 22:10
2

You can get max number of simultaneous connection for each browser by running a test (previously on a service like browserscope but the service is dead now, so you may do it manually)

The results based on your version and configurations.

Here is my network test results using Google Chrome Version 72.0.3626.121 (Official Build) (64-bit):

16. data: URLs = yes
15. Link Prefetch = no
14. Cache Resource Redirects = yes
13. Cache Redirects = yes
12. Cache Expires = yes
11. || CSS + Inline Script = no
10. || CSS = yes
9. Async Scripts = no
8. || Script Iframe = yes
7. || Script Image = yes
6. || Script Stylesheet = yes
5. || Script Script = yes
4. Max Connections = 24
3. Connections per Hostname = 6
2. Check Latency = 251
1. PerfTiming = yes

So it's maximum of 6 connections per hostname and 24 for different hostnames for Chrome 72.

Hope it helps.

Farhad
  • 803
  • 4
  • 8
  • 20