-
Notifications
You must be signed in to change notification settings - Fork 109
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
Usage #1
Comments
Sure. In fact this library is bundled and enabled by default in ngx_openresty, among other things :) |
Great, I'm quite new to these stack can you tell me how I need to use it in ngx_openresty for my website's resources(DNS Requests)? |
Hello! On Tue, Apr 2, 2013 at 11:21 AM, gauravt notifications@github.com wrote:
http://wiki.nginx.org/HttpLuaModule -agentzh |
Thanks 👍 Can we also use it to speed up our website? |
Hello! On Tue, Apr 2, 2013 at 11:32 AM, gauravt notifications@github.com wrote:
|
Can you give me any example to speed up a domain using lua-resty-dns? |
speed up a domain? you mean a dns local cache? |
@agentzh can add a feature to cache dns record using ngx-lua share Dict? |
@oikomi Just to clarify:
|
@agentzh I agree. Keep the project function minimization, Combined them. |
hi @agentzh, I have a question when recently playing ngx.socket.tcp. The problem is the host I set in /etc/hosts couldn't be used. But only native IP works. That means I have to parse /etc/hosts manually? Or if there is a module which do this job already? |
@xqpmjh Right. Neither the nginx builtin resolver nor lua-resty-dns honor the /etc/hosts file (or its equivalent on other exotic systems). For now you have to parse /etc/hosts yourself if you want to support it. |
@agentzh clear, thank you very much!! |
My problem is I need to fetch data from a website using a static ip means I have created a proxy in nginx which uses a domain+url-path but i need to use a static ip for it. |
@gauravt You're recommended to ask such general questions on the openresty-en mailing list where you're more likely to get answers: https://groups.google.com/group/openresty-en Thank you for your collaborations! Regarding your question, you can use the nginx's own dynamic resolver to do the magic for you. For example, location / {
resolver 8.8.8.8; # here we use Google's open DNS server just as an example
set $backend "my-aws-load-balancer-dns-name";
proxy_pass http://$backend;
} Use of nginx variables in |
I'm closing this. |
I am using NGX_OPENRESTY server, can I use this module for DNS Lookup?
The text was updated successfully, but these errors were encountered: