注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

老和山小和尚

敬天爱人

 
 
 

日志

 
 
 
 

Nginx upstream carp模块发布  

2009-07-14 13:00:48|  分类: Nginx |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Download:http://code.google.com/p/nginx-upstream-carp/

nginx_upstream_carp
-------

This module achieves partial CARP(Cache Array Routing Protocol) support in nginx upstream module. It chooses the backend server with a steady order. The same URL will always be forward to the backend with the same order when failure occurs. The score is calculated from server's weight and hash value of server name and URL. Detail information is in http://icp.ircache.net/carp.txt. This module do not support Array Membership Table. All the weight value are from the upstream server's weight.

INSTALLATION

1.This module needs libmath++.

2.compile nginx with the following addition option:

--add-module=/path/to/this/directory

EXAMPLE

upstream backend {
server 192.168.0.100 weight=1;
server 192.168.0.101 weight=2;
server 192.168.0.102 weight=3;
server 192.168.0.103 weight=4;

carp $scheme://$host:$server_port$request_uri;
}

DIRECTIVES

carp

syntax: carp [hash_string]
default: $uri
context: upstream
description: Enable the nginx_upstream_carp module and set the string to be hashed. The hash_string can contain several variables. With the hash value, the request will be routed to the highest score backend server.


Note: This is a third-party module. And you need careful test before using this module in your production environment.

Questions/patches may be directed to Weibin Yao, yaoweibin@gmail.com.

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

历史上的今天

评论

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

页脚

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