Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: #3520

Closed
pioneer-hash opened this issue Feb 4, 2021 · 7 comments
Closed

request help: #3520

pioneer-hash opened this issue Feb 4, 2021 · 7 comments

Comments

@pioneer-hash
Copy link

Issue description

When upstream selects type chash hash_on as cookie . This is what happened :
When a request to an upstream node returns a 404, it keeps sending requests to that upstream node without making a request to another node

Environment

  • apisix version (cmd: apisix version):2.1
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
@spacewander
Copy link
Member

Fixed by #2676

@Firstsawyou
Copy link
Contributor

Please note that your request is 404 and did not reach the upstream node. If the upstream node is unavailable, it should return a status code of 5xx. You need to make the request hit the unavailable upstream node of a valid route before you can select other available nodes.

@pioneer-hash
Copy link
Author

Please note that your request is 404 and did not reach the upstream node. If the upstream node is unavailable, it should return a status code of 5xx. You need to make the request hit the unavailable upstream node of a valid route before you can select other available nodes.

but if I choose roundrobin as upstream type , When a request to an upstream node returns a 404, the request is turn another node .The access.log will be printed multiple upstream information like this :172.18.193.68:23095, 172.18.193.68:23096,

@spacewander
Copy link
Member

This was a bug in chash and already has been fixed. See my previous reply.

@pioneer-hash
Copy link
Author

这是chash中的错误,并且已得到修复。请参阅我以前的回复。

thanks

@pioneer-hash
Copy link
Author

This was a bug in chash and already has been fixed. See my previous reply.

I see the Fixed by #2676 ,but My apisix version is 1.x ,Is there a way to fix it?

@spacewander
Copy link
Member

You can wait for the 2.3 release, or patch APISIX by yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants