openresty / lua-resty-dns

DNS resolver for the nginx lua module
324 stars 107 forks source link

How does the module process for cache? #37

Closed wubins closed 5 years ago

wubins commented 6 years ago

hello zhang : I have two questions:

1.I want to know if this module use dns cache for ip, and will the module query the local hosts file when it resolver dns?

2.if i use lua-resty-redis module , when ip of redis domain changed and call redis again, will the lua-resty-redis module resolve the redis domain realtime or throw a exception ?

thanks.

Tieske commented 5 years ago

no it does not have a cache.

A complete client, build on top of this resolver, is here: https://github.com/Kong/lua-resty-dns-client

agentzh commented 5 years ago

No, this library is intentionally being simplistic.