Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing Google Chrome's max-connections-per-server limit to more than 6

As far as I know, at the current moment, late 2011 the max-connections-per-server limit remains 6. Please correct me if I am wrong. This is bad that we cannot fix this easily as in Firefox. As far as I know this value is hardcoded.

One of the solutions is to download the Chromium's sources and rebuild them. Is there a more easy solution?

Is there any tricky way to hack this without creating a dozen of mirror-domains?

Why I'm asking the question: My task is to create a html-javascript slideshow that will run inside a fullscreened browser, and a huge monitor is hanging on the wall. The javascript is really complicated, it preloads photos and makes a lot of ajax calls to my web services. If WIFI connection is slow, if 6 photos are loading, the AJAX calls fail, the application runs bad. I want a fast solution based, on http or browser or ubuntu tweak something else, because rebuilding the javascript app will take days.

Offtopic: do you know any other things that can be tweaked in my concrete situation?

like image 202
Dan Avatar asked Dec 06 '11 17:12

Dan


People also ask

How many concurrent requests can Chrome handle?

While Chrome can only handle 10 requests at a time, Firefox can handle up to 17.

How many connections can a browser have?

Most modern browsers allow six connections per domain. Most older browsers allow only two connections per domain. The HTTP 1.1 protocol states that single-user clients should not maintain more than two connections with any server or proxy. This is the reason for browser limits.

How do you get to Google Chrome settings?

In Chrome, click the three-dot menu at the top right of the window, then click Settings. The Chrome settings page will open in a new browser tab, preserving whatever page you were already on.


2 Answers

IE is even worse with 2 connection per domain limit. But I wouldn't rely on fixing client browsers. Even if you have control over them, browsers like chrome will auto update and a future release might behave differently than you expect. I'd focus on solving the problem within your system design.

Your choices are to:

  1. Load the images in sequence so that only 1 or 2 XHR calls are active at a time (use the success event from the previous image to check if there are more images to download and start the next request).

  2. Use sub-domains like serverA.myphotoserver.com and serverB.myphotoserver.com. Each sub domain will have its own pool for connection limits. This means you could have 2 requests going to 5 different sub-domains if you wanted to. The downfall is that the photos will be cached according to these sub-domains. BTW, these don't need to be "mirror" domains, you can just make additional DNS pointers to the exact same website/server. This means you don't have the headache of administrating many servers, just one server with many DNS records.

like image 75
BenSwayne Avatar answered Oct 20 '22 01:10

BenSwayne


I don't know that you can do it in Chrome outside of Windows -- some Googling shows that Chrome (and therefore possibly Chromium) might respond well to a certain registry hack.

However, if you're just looking for a simple solution without modifying your code base, have you considered Firefox? In the about:config you can search for "network.http.max" and there are a few values in there that are definitely worth looking at.

Also, for a device that will not be moving (i.e. it is mounted in a fixed location) you should consider not using Wi-Fi (even a Home-Plug would be a step up as far as latency / stability / dropped connections go).

like image 35
BrainSlugs83 Avatar answered Oct 20 '22 01:10

BrainSlugs83