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

The interval time is not accurate #9310

Closed
thor533 opened this issue Apr 14, 2023 · 8 comments
Closed

The interval time is not accurate #9310

thor533 opened this issue Apr 14, 2023 · 8 comments

Comments

@thor533
Copy link

thor533 commented Apr 14, 2023

Description

In addition, I have one last question about the health check. I think the interval of the health check of apisix is not accurate. If you have a look at my configuration and this log, it does not correspond at all !
图片

my interface log is :
图片

Environment

  • APISIX version (run apisix :2.15-alpine):
  • 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):
@shreemaan-abhishek
Copy link
Contributor

What's wrong? I can see the health check happening every 2 seconds just as configured. Could you please explain what am I missing? Sorry for the hassle.

@thor533
Copy link
Author

thor533 commented Apr 18, 2023

What's wrong? I can see the health check happening every 2 seconds just as configured. Could you please explain what am I missing? Sorry for the hassle.

The status code of the active health check I set is 302, but my interface returns 200. Normally, according to the configuration, first of all, the active health check should be performed 5 times, each time for 2 seconds. Then, it should start to excute the unhealthy configuration should be performed 5 times, with an interval of 5 seconds. Is that right? I don't know if my understanding is correct, please help me correct, thank you very much for your reply

@thor533
Copy link
Author

thor533 commented Apr 18, 2023

What's wrong? I can see the health check happening every 2 seconds just as configured. Could you please explain what am I missing? Sorry for the hassle.

Excuse me, could you help me with this? thanks

@shreemaan-abhishek
Copy link
Contributor

@thor533, I could better help you if you could add the screenshot with English text in the issue description. I do not understand Chinese. 😅

@thor533
Copy link
Author

thor533 commented Apr 18, 2023

@thor533, I could better help you if you could add the screenshot with English text in the issue description. I do not understand Chinese. 😅

sir,thank your reply ,and you can see here:
图片

This interval really confused me. I don't know what kind of logic it is, which is very different from what I understand.
Looking forward to your reply! thanks

@shreemaan-abhishek
Copy link
Contributor

It depends on whether you are talking about active check or passive check.

The configuration that you currently have means that the health check will be done every 2 seconds, and if there are 5 successes the node will be marked as healthy. Also, if the upstream node returns 302, it will be marked as healthy.

For unhealthy nodes, it will check every the health check will be done every 5 seconds. If the upstream node returns error code: 429, the upstream node will be marked as unhealthy.

@thor533
Copy link
Author

thor533 commented Apr 19, 2023

It depends on whether you are talking about active check or passive check.

The configuration that you currently have means that the health check will be done every 2 seconds, and if there are 5 successes the node will be marked as healthy. Also, if the upstream node returns 302, it will be marked as healthy.

For unhealthy nodes, it will check every the health check will be done every 5 seconds. If the upstream node returns error code: 429, the upstream node will be marked as unhealthy.

I'm talking about active checking, my configuration above, first of all, the first time it should run the health status, it run it every two seconds,and he need to run five times, but the interface returns 200, not 302, on the sixth time, should it run the unhealthy configuration? it run every 5 seconds, and it return the status code 200, not 429, So it should be executed five times, right? But the test results, they don't match my understanding

@soulbird
Copy link
Contributor

same as #9327

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