Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2504056
  • 博文数量: 709
  • 博客积分: 12251
  • 博客等级: 上将
  • 技术积分: 7905
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-17 00:00
个人简介

实现有价值的IT服务

文章存档

2012年(7)

2011年(147)

2009年(3)

2008年(5)

2007年(74)

2006年(431)

2005年(42)

分类: 系统运维

2006-06-23 10:56:39

Cluster

From ResinWiki

configuration documentation is at .

Contents

[]

directive

directive description default
id unique identifier of the cluster ""
cluster-ref use the values from a directive
client-live-time how long the load-balancer should keep an idle socket open 30s
client-dead-time how long the load-balancer should treat a backend as dead 30s
client-read-timeout timeout of load-balancer reads 30s
client-write-timeout timeout of load-balancer writes
<> configures an srun port
[]

directive

directive description default
id unique identifier of the cluster definition ""
client-live-time how long the load-balancer should keep an idle socket open 30s
client-dead-time how long the load-balancer should treat a backend as dead 30s
client-read-timeout timeout of load-balancer reads 30s
client-write-timeout timeout of load-balancer writes
<> configures an srun port
[]

example

Clustering and load balancing is configured in a directive inside the <> block of the resin.conf.

A cluster with two machines might look like:

[]

resin.conf


...

  
    30s

    
    
  

  ...


[]

Load Balancing Timeouts

Load balancing has two sets of time outs, one set from the client (front-end) perspective, and one set from the server (back-end) perspective.

The client timeouts are configured directly in the directive. The server timeouts are configured in the individual <> directives.

client-read-timeout How long the frontend should wait on a read before timing out 60s
client-write-timeout How long the frontend should wait on a write before timing out 60s
client-live-time How long the frontend should keep a socket alive before discarding it 60s
client-dead-time How long the frontend should treat a backend as dead before retrying 15s
[]

resin.conf


  60s

  

The server timeouts specify how long the backend will wait for new data from a frontend before giving up. This timeout should be longer than the client-live-time.

read-timeout How long the backend should wait on a read before timing out 30s
write-timeout How long the backend should wait on a write before timing out 30s
[]

resin.conf


  ...
  
  ...


阅读(2186) | 评论(0) | 转发(0) |
0

上一篇:Load balancing

下一篇:数据库设计技巧

给主人留下些什么吧!~~