feat: enable etcd health-check#4191
Conversation
…e apisix fail Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
…rks in stream mode Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
…not been blocked Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
|
Things get a bit weird right now 😕 Before I work on this fix, I test that if killing one node out of an etcd cluster, apisix would fail, as those related issues talk about. However, right now when I test this scenario again on the master branch, apisix would not be affected by the closed etcd node and runs normally. I checked the recent commits and it seems no changes have applied to this problem. Could someone help me to reproduce the program again Test running apisix and etcd in Kubernetes, delete one etcd node, and apisix runs normally with master branch. So don't know if anything went wrong yet. |
|
Waiting for lua-resty-etcd new release: api7/lua-resty-etcd#129 |
Signed-off-by: yiyiyimu <[email protected]>
…st etcd endpoint Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
|
Waiting for api7/lua-resty-etcd#131 Done |
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
…oint choose problem in etcd (https://github.com/api7/lua-resty-etcd/pull/131\#discussion_r655804238) Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
| if string.find(err, err_etcd_unhealthy_all) then | ||
| local reconnected = false | ||
| while err and not reconnected do | ||
| local backoff_duration, backoff_factor, backoff_step = 1, 2, 10 |
There was a problem hiding this comment.
Will step 10 too large? As 1024 seconds is too long.
There was a problem hiding this comment.
I'm not so familiar with the production environment. Do you have some recommendations, like 8, around 4 mins at most? @tokers
There was a problem hiding this comment.
Maybe 6 is enough, also, since we are in a timer, keep a Nginx timer living for a long while is not a good practice as it might cause the memory leaky.
There was a problem hiding this comment.
Thanks for suggestion!
Changed to use outside counter till 32 to avoid keeping nginx timer too long. PTAL @tokers
Signed-off-by: yiyiyimu <[email protected]>

What this PR does / why we need it:
fix #3673
fix #3937.
Import health check of lua-resty-etcd, so
TODO:
Pre-submission checklist: