Chinaunix首页 | 论坛 | 博客
  • 博客访问: 534475
  • 博文数量: 120
  • 博客积分: 3030
  • 博客等级: 中校
  • 技术积分: 1445
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-05 01:00
文章存档

2011年(1)

2009年(2)

2008年(32)

2007年(33)

2006年(52)

我的朋友

分类: LINUX

2008-12-16 14:33:31

  在HTTP 1.1 Spec中针对Persistent Connections提出了这样的Practical considerations:
      Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion.
      以上内容表明,为了提高HTTP响应时间以及避免产生网络堵塞,HTTP连接中的客户端不应该与服务器端建立超过2个的HTTP连接。如果有更多的请求需要,那么这些请求将被pipeline到这两个HTTP连接之中,并以异步的方式传送给服务器端。举个例子:有上百辆汽车(requests)想从天津开往北京,但是天津与北京之间最多只允许修建两条公路(HTTP connection),因此这些汽车要想从天津驶往北京的话,就只能走这两条公路。

阅读(1567) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~