comparison src/http/ngx_http_upstream_round_robin.h @ 1344:8f5b5641966c

fair upstream weight balancer
author Igor Sysoev <igor@sysoev.ru>
date Sat, 28 Jul 2007 16:04:01 +0000
parents be2b895d31e0
children 0be898896d1a
comparison
equal deleted inserted replaced
1343:d77866cf2cc4 1344:8f5b5641966c
16 typedef struct { 16 typedef struct {
17 struct sockaddr *sockaddr; 17 struct sockaddr *sockaddr;
18 socklen_t socklen; 18 socklen_t socklen;
19 ngx_str_t name; 19 ngx_str_t name;
20 20
21 ngx_uint_t current_weight; 21 ngx_int_t current_weight;
22 ngx_uint_t weight; 22 ngx_int_t weight;
23 23
24 ngx_uint_t fails; 24 ngx_uint_t fails;
25 time_t accessed; 25 time_t accessed;
26 26
27 ngx_uint_t max_fails; 27 ngx_uint_t max_fails;
28 time_t fail_timeout; 28 time_t fail_timeout;
29 29
30 ngx_uint_t down; /* unsigned down:1; */ 30 ngx_uint_t down; /* unsigned down:1; */
31 31
32 #if (NGX_SSL) 32 #if (NGX_HTTP_SSL)
33 ngx_ssl_session_t *ssl_session; /* local to a process */ 33 ngx_ssl_session_t *ssl_session; /* local to a process */
34 #endif 34 #endif
35 } ngx_http_upstream_rr_peer_t; 35 } ngx_http_upstream_rr_peer_t;
36 36
37 37
38 typedef struct { 38 typedef struct {
39 ngx_uint_t current;
40
41 ngx_uint_t number; 39 ngx_uint_t number;
42 ngx_uint_t last_cached; 40 ngx_uint_t last_cached;
43 41
44 /* ngx_mutex_t *mutex; */ 42 /* ngx_mutex_t *mutex; */
45 ngx_connection_t **cached; 43 ngx_connection_t **cached;