Kong / lua-resty-dns-client

Lua DNS client, load balancer, and utility library
http://kong.github.io/lua-resty-dns-client/topics/README.md.html
Apache License 2.0
152 stars 52 forks source link

fix(base) reduce the amount of timers used #105

Closed kikito closed 3 years ago

kikito commented 4 years ago

This PR changes the timers so that instead of creating one per balancer we crete a single global one. The price payed is that we must store a glocal variable with all the lbs inside.

The DNS refresh is async so no further timers/threads are needed.

Note that the single global recurring timer is now marked as "detached" so that it is not garbage-collected.

locao commented 3 years ago

Superseded by #112