api7 / lua-resty-etcd

Nonblocking Lua etcd driver library for OpenResty

Home Page:https://api7.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: when no endpoints is healthy, "it will cause crazy retries"

Yiyiyimu opened this issue · comments

#109 fixed the situation when some endpoints got taints it could be jumped over. But when all endpoints are unhealthy, it keeps the old method, so the problem of #101 still not fixed and "it will cause crazy retries". See discussion

I added a bug, let us fix it

commented

so we stop requesting etcd when all endpoints are unhealthy?

How about increasing the waiting time?

commented

How about increasing the waiting time?

ngx.sleep?

It is more reasonable for the caller to add processing logic.

commented

provide some processing strategies for caller to choose from?

  • stop requesting etcd(default)
  • ngx.sleep
  • keeps the old method
commented

It is more reasonable for the caller to add processing logic.

are you saying let the caller write the code themselves and have healthcheck call it?

When there is no healthy node available, we can directly return an error message.
The caller decides how long to sleep based on the return error message.

commented

When there is no healthy node available, we can directly return an error message.
The caller decides how long to sleep based on the return error message.

agree +1

we can check the process way in APISIX ^_^

commented

assigned me, fix soon