You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/08/04 10:00:25 UTC
[GitHub] [apisix] kuberxy commented on issue #4649: request help: Why is the request forwarded to an unhealthy node
kuberxy commented on issue #4649:
URL: https://github.com/apache/apisix/issues/4649#issuecomment-892528919
@spacewander I have a question: In my scenario, one node is out of network (Connection timed out), and the other two nodes are normal. Why did Apisix not forward the request to the normal node, but still forward it to the abnormal node.
When I force a refresh, the page has been loading.
In the same scenario, I directly use Nginx as a proxy, and the page is loaded quickly. my nginx config like this:
```
upstream nginx {
server nginx1:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
server nginx2:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
server nginx3:8080 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
}
upstream tomcat {
server tomcat1:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
server tomcat2:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
server tomcat3:8081 weight=1 max_conns=0 max_fails=1 fail_timeout=10;
}
server {
server_name 0.0.0.0;
listen 80;
location ~* \.(jpg|gif|png|css|js|html|ico|ttf)$ {
proxy_pass http://nginx;
proxy_set_header Host $http_host;
}
location / {
proxy_pass http://tomcat;
proxy_set_header Host $http_host;
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org