将 Google Chrome 的每台服务器最大连接数限制增加到 6 个以上 [英] Increasing Google Chrome's max-connections-per-server limit to more than 6

查看:97
本文介绍了将 Google Chrome 的每台服务器最大连接数限制增加到 6 个以上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,目前,在 2011 年底,每个服务器的最大连接数限制仍为 6.如果我错了,请纠正我.这很糟糕,我们不能像在 Firefox 中那样轻松解决这个问题.据我所知,这个值是硬编码的.

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.

解决方案之一是下载 Chromium 的源代码并重建它们.有没有更简单的解决方案?

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?

我为什么要问这个问题:我的任务是创建一个 html-javascript 幻灯片,该幻灯片将在全屏浏览器中运行,并且墙上挂着一个巨大的显示器.javascript 真的很复杂,它会预加载照片并对我的 Web 服务进行大量 ajax 调用.如果WIFI连接速度慢,如果加载6张照片,AJAX调用失败,应用程序运行不良.我想要一个基于 http 或浏览器或 ubuntu 调整其他东西的快速解决方案,因为重建 javascript 应用程序需要几天时间.

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:你知道在我的具体情况下还有什么可以调整的吗?

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

推荐答案

IE 更糟糕,每个域限制 2 个连接.但我不会依赖修复客户端浏览器.即使您可以控制它们,Chrome 等浏览器也会自动更新,并且未来版本的行为可能与您预期的有所不同.我会专注于解决您系统设计中的问题.

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.

您的选择是:

  1. 按顺序加载图像,以便一次只有 1 或 2 个 XHR 调用处于活动状态(使用上一个图像中的成功事件检查是否有更多图像要下载并开始下一个请求).

  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).

使用子域,例如 serverA.myphotoserver.com 和 serverB.myphotoserver.com.每个子域都有自己的连接限制池.这意味着如果您愿意,您可以将 2 个请求发送到 5 个不同的子域.缺点是照片将根据这些子域进行缓存.顺便说一句,这些不需要是镜像"域,您只需将额外的 DNS 指针指向完全​​相同的网站/服务器即可.这意味着您不必为管理多台服务器而头疼,只需管理一台具有许多 DNS 记录的服务器即可.

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.

这篇关于将 Google Chrome 的每台服务器最大连接数限制增加到 6 个以上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆