Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is there any way to get the ips from DNS? #43

Open
rjshrjndrn opened this issue Feb 24, 2022 · 2 comments
Open

[Question] Is there any way to get the ips from DNS? #43

rjshrjndrn opened this issue Feb 24, 2022 · 2 comments

Comments

@rjshrjndrn
Copy link

Hi,
Thank you for this awesome plugin. I have got a specific scenario. I'm trying to DNS Loadbalance (sticky sessions) a websocket service. I've tried with static IPs, and this plugin works beautifully.
Unfortunately, I'm a noob in lua. Is there any way to integrate this solution with the dns queries, rather than giving static ips.
Any suggestions are highly appreciated.

Regrads.

@xiaocang
Copy link

maybe you could use https://github.com/openresty/lua-resty-dns

@rjshrjndrn
Copy link
Author

Thank you @xiaocang for your response. I saw this plugin while trying to solve the issue. But I couldn't get my head around how to use the DNS plugin for host queries and return the result to this plugin.
My concerns are, each time, If I call the DNS plugin, it's an expensive call. Then I'll have to implement some kind of LRU logic, or resolver timeout something like that. I'm not that expert in Lua, as I mentioned earlier.
This library seems like a good solution, But there is no getting started guide or code samples. 😕 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants