带有iis服务器的nginx,负载平衡
我正在尝试使用nginx对IIS中托管的服务器进行负载平衡。如果我关闭其中一个应用程序池,nginx应该停止向该服务器发送请求。但我看到nginx将继续向这两台服务器发送请求带有iis服务器的nginx,负载平衡,iis,nginx,load-balancing,winginx,Iis,Nginx,Load Balancing,Winginx,我正在尝试使用nginx对IIS中托管的服务器进行负载平衡。如果我关闭其中一个应用程序池,nginx应该停止向该服务器发送请求。但我看到nginx将继续向这两台服务器发送请求 **NGINX LOad Balancing** 即使我关闭了应用程序池,Nginx仍将继续向其他服务器发送请求 events { worker_connections 2048; } http { include mime.types;
**NGINX LOad Balancing**
即使我关闭了应用程序池,Nginx仍将继续向其他服务器发送请求
events {
worker_connections 2048;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile off;
#tcp_nopush on;
keepalive_timeout 0;
upstream xxx {
server xxxxxxx:80 max_fails=1 fail_timeout=30;
server xxxxxxxx:80 max_fails=1 fail_timeout=30;
}
server {
listen zzzz;
server_name localhost;
location /yy {
proxy_cache off;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_pass http://xxx;
}
}
服务不可用
服务不可用
HTTP错误503。服务不可用
如果我没有错,NGNIX仍然继续调用那个服务器,因为他没有发现奇怪的东西…端口80是可到达的,你必须改变检查方法来找到HTTP错误。例如,这个……如果HTTP响应不是200,他认为服务器“坏”。然后他将其从池中删除。应用程序池不是服务器,如果我没有弄错的话,只有关闭web服务器上的IIS,此设置才会起作用。我的意思是关闭应用程序池。即使我关闭了iis服务器,nginx仍会返回404个状态。理想情况下,它应该取消订阅。
<HTML>
<HEAD>
<TITLE>Service Unavailable</TITLE>
</HEAD>
<BODY>
<h2>Service Unavailable</h2>
<hr>
<p>HTTP Error 503. The service is unavailable.</p>
</BODY>
</HTML>