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

the first chosen endpoint of lua-resty-etcd is always the first endpoint

spacewander opened this issue · comments

We should introduce a random initial offset, otherwise all the connections will hit the first endpoint.

All the endpoints should be treated as nodes in a ring.

We pick the first node from a random position in the ring, if it is unhealthy, try the node after it.