注册 登录  
 加关注

网易博客网站关停、迁移的公告:

将从2018年11月30日00:00起正式停止网易博客运营
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

老和山小和尚

敬天爱人

 
 
 

日志

 
 
 
 

Nginx's patch for upstream keepalive  

2008-10-28 16:50:35|  分类: Nginx |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

The module and patch's author is Maxim Dounin.It's great work.
On Fri, Oct 24, 2008 Maxim Dounin said: "it's keepalive upstream balancer module, it may be used to keep connections to memcached alive.It won't work with http or fastcgi backends, don't even try."
However, it's a good beginning.
Mercurial repository may be found here:
http://mdounin.ru/hg/ngx_http_upstream_keepalive
More details here:
http://mdounin.ru/hg/ngx_http_upstream_keepalive/raw-file/tip/README
And On Mon, Oct 27, 2008  he released Nginx's patches for http and fastcgi backends. But as he said:" The following patch series consists of various generic patches for nginx not yet imported by Igor."
I collected the patches here(up to 2008-10-27) :
http://yaoweibin.cn/maindoc/patch_for_upsteam_keepalive.txt
Let's have a test and research.

 

测试了下,发现效果一般啊。

keepalive on:

request per second:1119

CPUload:1.97

keepalive off:

request per second:1183

CPUload:1.68

主机:Intel(R) Pentium(R) 4 CPU 3.00GHz,内存256M

系统:Linux debian-yaoweibin 2.6.18-6-686 #1 SMP Thu Oct 9 15:52:18 UTC 2008 i686 GNU/Linux

虚拟机:VMvare6.03

Nginx:0.7.19

upstream memd {

        server 127.0.0.1:80;

#       keepalive 10;

}

server {

        listen   8888;

        server_name  localhost;

        access_log  /var/log/nginx/localhost.access.log;

        location / {

                proxy_pass http://memd;

        }

apache2.2.3(prefork)

用的是apche的默认配置及主页

测试命令:

ab -k -c 10 -t 60  -n 100000 http://192.168.203.131:8888/apache2-default/index.html && uptime

  评论这张
 
阅读(1296)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018