Mercurial > hg > nginx-quic
annotate auto/cc/bcc @ 4207:4fc91bae6f83
Better recheck of dead upstream servers.
Previously nginx used to mark backend again as live as soon as fail_timeout
passes (10s by default) since last failure. On the other hand, detecting
dead backend takes up to 60s (proxy_connect_timeout) in typical situation
"backend is down and doesn't respond to any packets". This resulted in
suboptimal behaviour in the above situation (up to 23% of requests were
directed to dead backend with default settings).
More detailed description of the problem may be found here (in Russian):
http://mailman.nginx.org/pipermail/nginx-ru/2011-August/042172.html
Fix is to only allow one request after fail_timeout passes, and
mark backend as "live" only if this request succeeds.
Note that with new code backend will not be marked "live" unless "check"
request is completed, and this may take a while in some specific workloads
(e.g. streaming). This is believed to be acceptable.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 12 Oct 2011 14:22:48 +0000 |
parents | d43d73277c5c |
children | d620f497c50f |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 # Borland C++ 5.5 | |
6 | |
7 # optimizations | |
8 | |
9 # maximize speed | |
10 CFLAGS="$CFLAGS -O2" | |
11 | |
12 case $CPU in | |
13 pentium) | |
14 # optimize for Pentium and Athlon | |
15 CPU_OPT="-5" | |
16 ;; | |
17 | |
18 pentiumpro) | |
19 # optimize for Pentium Pro, Pentium II and Pentium III | |
20 CPU_OPT="-6" | |
21 ;; | |
22 esac | |
23 | |
503 | 24 # __stdcall |
25 #CPU_OPT="$CPU_OPT -ps" | |
26 # __fastcall | |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
795
diff
changeset
|
27 #CPU_OPT="$CPU_OPT -pr" |
503 | 28 |
455 | 29 CFLAGS="$CFLAGS $CPU_OPT" |
30 | |
31 # multithreaded | |
32 CFLAGS="$CFLAGS -tWM" | |
33 | |
34 # stop on warning | |
35 CFLAGS="$CFLAGS -w!" | |
36 | |
37 # disable logo | |
38 CFLAGS="$CFLAGS -q" | |
39 | |
461 | 40 |
455 | 41 # precompiled headers |
795 | 42 CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.csm" |
43 NGX_PCH="$NGX_OBJS/ngx_config.csm" | |
44 NGX_BUILD_PCH="-H=$NGX_OBJS/ngx_config.csm" | |
45 NGX_USE_PCH="-Hu -H=$NGX_OBJS/ngx_config.csm" | |
455 | 46 |
461 | 47 |
48 # Win32 GUI mode application | |
2725 | 49 #LINK="\$(CC) -laa" |
461 | 50 |
51 | |
52 # the resource file | |
469 | 53 NGX_RES="$NGX_OBJS/nginx.res" |
54 NGX_RCC="brcc32 -fo$NGX_OBJS/nginx.res \$(CORE_INCS) $NGX_WIN32_RC" | |
461 | 55 # the pragma allows to link the resource file using bcc32 and |
56 # to avoid the direct ilink32 calling and the c0w32.obj's WinMain/main problem | |
469 | 57 NGX_PRAGMA="#pragma resource \"$NGX_OBJS/nginx.res\"" |
461 | 58 |
455 | 59 |
60 ngx_include_opt="-I" | |
61 ngx_objout="-o" | |
62 ngx_binout="-e" | |
63 ngx_objext="obj" | |
64 ngx_binext=".exe" | |
461 | 65 |
573 | 66 ngx_long_start='@&&| |
67 ' | |
68 ngx_long_end='|' | |
69 | |
461 | 70 ngx_regex_dirsep='\\' |
71 ngx_dirsep="\\" |