apisix icon indicating copy to clipboard operation
apisix copied to clipboard

apisix will retry the post method?

Open kellyseeme opened this issue 1 year ago • 6 comments

Description

use the apisix default value,if the post request return 502,then apisix will retry the next upstream server and return 200,how to chang this?and why use settings?

Environment

  • APISIX version (run apisix version):2.15.3
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

kellyseeme avatar Jun 17 '24 15:06 kellyseeme

Do you mean you want APISIX to return 5xx instead of trying the next upstream node?

kayx23 avatar Jun 19 '24 05:06 kayx23

Do you mean you want APISIX to return 5xx instead of trying the next upstream node?

yes,which place i can cancle this settings?

kellyseeme avatar Jun 21 '24 05:06 kellyseeme

I don't think this is possible (cc @shreemaan-abhishek ). Can you provide your use case and explain why you would like to implement this?

kayx23 avatar Jun 21 '24 06:06 kayx23

I don't think this is possible (cc @shreemaan-abhishek ). Can you provide your use case and explain why you would like to implement this?

Post requests are not idempotent and retrying is risky.

kellyseeme avatar Jun 21 '24 07:06 kellyseeme

I don't think this is possible (cc @shreemaan-abhishek ). Can you provide your use case and explain why you would like to implement this?

Which scenarios and request methods are retried by default? Can you list this?

kellyseeme avatar Jun 21 '24 08:06 kellyseeme

I think this can help you .But you may need edit nginx.conf after apisix init if config.yml not support this https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream

ShenFeng312 avatar Jun 28 '24 09:06 ShenFeng312