Hi, sjaak<br><br><div class="gmail_quote">On Mon, Oct 3, 2011 at 10:39 PM, Sjaak Pieterse <span dir="ltr"><<a href="mailto:sjaak23@gmail.com">sjaak23@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey Liseen,<br>
<br>
Thank you for teh fix, it's working now for standard round robin, for<br>
upstream_hash it's not working but that's no problem for us we are not<br>
using that in production.<br></blockquote><div>The fail test also add one time to hash_again. <span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 14px; ">Can you set hash_again 10(greater than or equal servers's number), try again and tell me the result? The upstream_hash module has worked for some time.</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 15px;"><br></span></font></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
what we often use is gnosek-nginx-upstream-fair, to make it work with<br>
that, can you tell how to handle?<br></blockquote><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Patch the upstream-fair module like round_robin and upstream_hash module.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Maybe these should be a module that contains all of the following features: </span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; ">RR, Hash, Fair, Health check. </span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; ">Hope some body will provide such module. I don't like patching code.</span></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
<br>
this is what i've done to make it work for now:<br>
<br>
peckhardt@test-nginx:~/nginx-1.0.6$ patch -p1 <<br>
../liseen-healthcheck_nginx_upstreams-17298cf/healthcheck.patch<br>
patching file src/http/ngx_http_upstream.c<br>
Hunk #1 succeeded at 4270 (offset 11 lines).<br>
patching file src/http/ngx_http_upstream.h<br>
patching file src/http/ngx_http_upstream_round_robin.c<br>
Hunk #2 succeeded at 25 with fuzz 2 (offset 9 lines).<br>
Hunk #3 succeeded at 33 (offset 9 lines).<br>
Hunk #4 succeeded at 68 (offset 9 lines).<br>
Hunk #5 succeeded at 416 (offset 7 lines).<br>
Hunk #6 succeeded at 448 (offset 7 lines).<br>
Hunk #7 succeeded at 465 (offset 7 lines).<br>
Hunk #8 succeeded at 506 (offset 7 lines).<br>
Hunk #9 succeeded at 523 (offset 7 lines).<br>
Hunk #10 succeeded at 617 (offset 7 lines).<br>
patching file src/http/ngx_http_upstream_round_robin.h<br>
<br>
peckhardt@test-nginx:~/nginx-1.0.6$sudo ./configure<br>
--with-http_ssl_module<br>
--add-module=/home/peckhardt/gnosek-nginx-upstream-fair-2131c73<br>
--with-http_stub_status_module<br>
--add-module=/home/peckhardt/liseen-healthcheck_nginx_upstreams-17298cf<br>
--add-module=/home/peckhardt/liseen-nginx_upstream_hash-43fab03<br>
--prefix=/usr/local/nginx-1.0.6 --with-debug<br>
<br>
peckhardt@test-nginx:~/nginx-1.0.6$sudo su<br>
peckhardt@test-nginx:~/nginx-1.0.6$make install clean<br>
<br>
nginx config:<br>
########### test healthcheck ######<br>
upstream www-health{<br>
server 213.154.235.185 ;<br>
server 213.136.14.13 ;<br>
#hash $request_uri;<br>
#hash_again 1;<br>
<div class="im"> healthcheck_enabled;<br>
healthcheck_delay 10000 ;<br>
healthcheck_timeout 1000;<br>
healthcheck_failcount 2;<br>
#healthcheck_expected 'I_AM_ALIVE';<br>
#Important: HTTP/1.0<br>
</div> healthcheck_send "GET / HTTP/1.0" 'Host: <a href="http://health.test.x.com" target="_blank">health.test.x.com</a>';<br>
}<br>
<br>
<br>
<br>
2011/10/1 liseen <<a href="mailto:liseen.wan@gmail.com">liseen.wan@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hi,<br>
><br>
> On Sat, Oct 1, 2011 at 7:16 AM, liseen <<a href="mailto:liseen.wan@gmail.com">liseen.wan@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>> Please try:<br>
>><br>
>> <a href="https://github.com/liseen/healthcheck_nginx_upstreams/blob/master/healthcheck.patch" target="_blank">https://github.com/liseen/healthcheck_nginx_upstreams/blob/master/healthcheck.patch</a><br>
>> patch -p1 < healthcheck.patch<br>
>> ./configure ....<br>
>> if you use healthcheck with upstream hash, please compile with branch<br>
>> support_http_healthchecks of cep21's fork<br>
>><br>
>> <a href="https://github.com/cep21/nginx_upstream_hash/tree/support_http_healthchecks" target="_blank">https://github.com/cep21/nginx_upstream_hash/tree/support_http_healthchecks</a><br>
><br>
> if all upstreams' backends are down(healthcheck), cep's upstream_hash will<br>
> ignore Healthcheck, if it is not you need, Please try:<br>
> <a href="https://github.com/liseen/nginx_upstream_hash" target="_blank">https://github.com/liseen/nginx_upstream_hash</a><br>
> If you find something wrong, please open an issue on github. thanks.<br>
><br>
> liseen<br>
><br>
>><br>
>><br>
>><br>
>> liseen<br>
>><br>
>><br>
>> On Sat, Oct 1, 2011 at 6:06 AM, liseen <<a href="mailto:liseen.wan@gmail.com">liseen.wan@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>> It is a bug.<br>
>>> the ngx_upstream_get_peer only check the index greater than i; forgot to<br>
>>> check i itself.<br>
>>> I used my nginx patch for healthcheck, I have used it in production more<br>
>>> than half a year. I will upload it to my github in some hours.<br>
>>> liseen<br>
>>> On Fri, Sep 23, 2011 at 4:34 AM, Sjaak Pieterse <<a href="mailto:sjaak23@gmail.com">sjaak23@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Hi there,<br>
>>>><br>
>>>> i'm trying to use the HttpHealthcheckModule for nginx, but i have some<br>
>>>> troubles with it.<br>
>>>><br>
>>>> i have two servers in my upstream, when sabotaging the health for one<br>
>>>> server i see in the status view of healthcheck that the server is<br>
>>>> down(1), but if i go to the website i'm checking i still come out on<br>
>>>> it and see a broken page.<br>
>>>><br>
>>>> how can i arrange that the server automatically is marked as down when<br>
>>>> the check fails?<br>
>>>><br>
>>>> sorry for my bad english and maybe noob questions.<br>
>>>><br>
>>>> config:<br>
>>>> upstream www-health{<br>
>>>> server x.x.x.1 ;<br>
>>>> server x.x.x.2 ;<br>
>>>> healthcheck_enabled;<br>
>>>> healthcheck_delay 10000 ;<br>
>>>> healthcheck_timeout 1000;<br>
>>>> healthcheck_failcount 2;<br>
>>>> #healthcheck_expected 'I_AM_ALIVE';<br>
>>>> #Important: HTTP/1.0<br>
>>>> healthcheck_send "GET / HTTP/1.0" 'Host: <a href="http://health.test.x.com" target="_blank">health.test.x.com</a>'<br>
>>>> 'Conection: close' ;<br>
>>>> }<br>
>>>><br>
>>>> nginx: nginx version: nginx/1.0.6<br>
>>>> nginx: built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)<br>
>>>> nginx: TLS SNI support enabled<br>
>>>> nginx: configure arguments: --with-http_ssl_module<br>
>>>> --add-module=/gnosek-nginx-upstream-fair-2131c73<br>
>>>> --with-http_stub_status_module<br>
>>>> --add-module=/cep21-healthcheck_nginx_upstreams-b33a846<br>
>>>> --prefix=/usr/local/nginx-1.0.6 --with-debug<br>
>>>><br>
>>>> used:<br>
>>>> peckhardt@test-nginx:~/nginx-1.0.6$patch -p1 <<br>
>>>> /cep21-healthcheck_nginx_upstreams-5fa4bff/nginx.patch<br>
>>>><br>
>>>> hope someone would help me.<br>
>>>><br>
>>>> greetings<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> nginx mailing list<br>
>>>> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
>>>> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
>>><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>