Mercurial > hg > nginx-vendor-0-7
annotate src/http/ngx_http_upstream_round_robin.h @ 366:babd3d9efb62 NGINX_0_6_27
nginx 0.6.27
*) Change: now by default the rtsig method is not built on
Linux 2.6.18+.
*) Change: now a request method is not changed while redirection to a
named location via an "error_page" directive.
*) Feature: the "resolver" and "resolver_timeout" directives in SMTP
proxy.
*) Feature: the "post_action" directive supports named locations.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: browsers did not repeat SSL handshake if there is no valid
client certificate in first handshake.
Thanks to Alexander V. Inyukhin.
*) Bugfix: if response code 495-497 was redirected via an "error_page"
directive without code change, then nginx tried to allocate too many
memory.
*) Bugfix: memory leak in long-lived non buffered connections.
*) Bugfix: memory leak in resolver.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: in the $proxy_host and $proxy_port variables caching.
Thanks to Sergey Bochenkov.
*) Bugfix: a "proxy_pass" directive with variables used incorrectly the
same port as in another "proxy_pass" directive with the same host
name and without variables.
Thanks to Sergey Bochenkov.
*) Bugfix: an alert "sendmsg() failed (9: Bad file descriptor)" on some
64-bit platforms while reconfiguration.
*) Bugfix: a segmentation fault occurred in worker process, if empty
stub block was used second time in SSI.
*) Bugfix: in copying URI part contained escaped symbols into arguments.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Mar 2008 00:00:00 +0300 |
parents | e10168d6e371 |
children |
rev | line source |
---|---|
260 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_HTTP_UPSTREAM_ROUND_ROBIN_H_INCLUDED_ | |
8 #define _NGX_HTTP_UPSTREAM_ROUND_ROBIN_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 #include <ngx_http.h> | |
14 | |
15 | |
16 typedef struct { | |
17 struct sockaddr *sockaddr; | |
18 socklen_t socklen; | |
19 ngx_str_t name; | |
20 | |
324 | 21 ngx_int_t current_weight; |
22 ngx_int_t weight; | |
260 | 23 |
24 ngx_uint_t fails; | |
25 time_t accessed; | |
26 | |
27 ngx_uint_t max_fails; | |
28 time_t fail_timeout; | |
29 | |
30 ngx_uint_t down; /* unsigned down:1; */ | |
31 | |
324 | 32 #if (NGX_HTTP_SSL) |
318 | 33 ngx_ssl_session_t *ssl_session; /* local to a process */ |
260 | 34 #endif |
35 } ngx_http_upstream_rr_peer_t; | |
36 | |
37 | |
326 | 38 typedef struct ngx_http_upstream_rr_peers_s ngx_http_upstream_rr_peers_t; |
39 | |
40 struct ngx_http_upstream_rr_peers_s { | |
41 ngx_uint_t single; /* unsigned single:1; */ | |
260 | 42 ngx_uint_t number; |
43 ngx_uint_t last_cached; | |
44 | |
45 /* ngx_mutex_t *mutex; */ | |
46 ngx_connection_t **cached; | |
47 | |
48 ngx_str_t *name; | |
49 | |
326 | 50 ngx_http_upstream_rr_peers_t *next; |
51 | |
260 | 52 ngx_http_upstream_rr_peer_t peer[1]; |
326 | 53 }; |
260 | 54 |
55 | |
56 typedef struct { | |
57 ngx_http_upstream_rr_peers_t *peers; | |
58 ngx_uint_t current; | |
272 | 59 uintptr_t *tried; |
260 | 60 uintptr_t data; |
61 } ngx_http_upstream_rr_peer_data_t; | |
62 | |
63 | |
64 ngx_int_t ngx_http_upstream_init_round_robin(ngx_conf_t *cf, | |
65 ngx_http_upstream_srv_conf_t *us); | |
66 ngx_int_t ngx_http_upstream_init_round_robin_peer(ngx_http_request_t *r, | |
67 ngx_http_upstream_srv_conf_t *us); | |
348 | 68 ngx_int_t ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r, |
69 ngx_http_upstream_resolved_t *ur); | |
260 | 70 ngx_int_t ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, |
71 void *data); | |
72 void ngx_http_upstream_free_round_robin_peer(ngx_peer_connection_t *pc, | |
73 void *data, ngx_uint_t state); | |
74 | |
75 #if (NGX_HTTP_SSL) | |
318 | 76 ngx_int_t |
77 ngx_http_upstream_set_round_robin_peer_session(ngx_peer_connection_t *pc, | |
78 void *data); | |
79 void ngx_http_upstream_save_round_robin_peer_session(ngx_peer_connection_t *pc, | |
260 | 80 void *data); |
81 #endif | |
82 | |
83 | |
84 | |
85 #endif /* _NGX_HTTP_UPSTREAM_ROUND_ROBIN_H_INCLUDED_ */ |