0

Suppose my Angular application is having a webworker thread. The main thread is calling X number of async XHR calls and the webworker thread is making Y number of async XHR calls. Both the calls are going to the same server. In that case, does X + Y adhere to the total number of permissible http connection of the browser (6 for Chrome), or X and Y separately adhere to 6.

Basically by using web worker - can I get more http connections per server IP? (6 becomes 12)? Or it subjects to the same browser limit of 6?

If it's latter (same browser limit of 6) - how can I increase the limit, if any tricks for Angular application.

Pradip
  • 509
  • 1
  • 5
  • 22

1 Answers1

2

All browsers strict maximum number of HTTP Connection per Domain is 6. If you want to reach over 6, you can do in two ways:

  1. Domain Sharding: You can create more subdomains to share the workload. Ex: you can split www.abc.com to static.abc.com for Static Files, orderapi.abc.com for Order API, etc...
  2. HTTP 2: In case you understand deeply HTTP/2 and your BE server supports HTTP/2, you can perform HTTP/2, read this article
Johnathan Le
  • 675
  • 3
  • 8
  • Thank You. I was reading this thread [https://stackoverflow.com/questions/14068084/opinion-about-synchronous-requests-in-web-workers/14069326?noredirect=1#comment88828137_14069326] which pointed out that web workers increase the max count. So 1 more web worker will allow 6 more HTTP connections. – Pradip Jun 27 '20 at 13:45