Welcome! Log In Create A New Profile

Advanced

Re: HttpUpstreamModule: Need more detailed Information

姚伟斌
August 12, 2012 10:44PM
2012/8/10 Axel <ar@xlrs.de>:
> Hello all,
>
> i'm new to nginx and first of all i have to say it's a great piece of
> software.
>
> I need some more detailed Information about nginx behaviour regarding
> HttpUpstreamModule and I hope you can give me some hints and links where i
> can learn more about it.
> I set up nginx/1.2.2 as reverse proxy in front of a bunch of apache
> server(*) which are located in different housing locations.
>
> Now I have some questions and I can't find any docs or wiki pages with
> detailed answers.
>
> - how does nginx detect if one ore more upstream servers has diappeared?
> - what kind of mechanism does nginx use? icmp or something else?
> - how often does nginx request the status of upstream servers?
>
> - how can I monitor the status of upstream server seen by nginx (I monitor
> the status of running apache prcesses on the upstream server separately)

You may try the Tengine (http://tengine.taobao.org/), a forked nginx
version. We added proactive health check for the upstream servers.

This module (http://tengine.taobao.org/document/http_upstream_check.html)
can check the upstream servers periodically. If the upstream is marked
down, the request will not be sent to this server. If it's up, the
request will be sent to it again.

If you don't like this forked Nginx, you also can use the single
ngx_http_upstream_check module
(https://github.com/yaoweibin/nginx_upstream_check_module). It can
supply the same feature as Tengine.

Thanks. Good luck.

>
>
> It's a is really simple setup atm and I have not activated any other module:
>
> upstream frontend {
> server frontend1:80 weight=100 max_fails=2 fail_timeout=10s;
> server frontend2:80 weight=100 max_fails=2 fail_timeout=10s;
> server frontend3:80 weight=100 max_fails=2 fail_timeout=10s;
> server frontend4:80 weight=100 max_fails=2 fail_timeout=10s;
> server frontend5:80 weight=100 max_fails=2 fail_timeout=10s;
> }
>
> location / {
> proxy_next_upstream http_502 http_503 error;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_pass http://frontend/;
> proxy_redirect default;
> }
>
> I googled around and found this thread
> http://forum.nginx.org/read.php?29,108477 but got no answer.
>
> Any help is appreciated
>
> Regards, Axel
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

HttpUpstreamModule: Need more detailed Information

Axel August 10, 2012 07:38AM

Re: HttpUpstreamModule: Need more detailed Information

Maxim Dounin August 10, 2012 09:46AM

Re: HttpUpstreamModule: Need more detailed Information

Axel August 13, 2012 02:26AM

Re: HttpUpstreamModule: Need more detailed Information

姚伟斌 August 12, 2012 10:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready