-
Notifications
You must be signed in to change notification settings - Fork 74
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
can work with dyups? #14
Comments
If DNS SRV record support can be added #3 , we may not need the dyups. When a new upstream server is added/removed, a request can be sent to update the DNS server (e.g.: Consul https://www.consul.io/ ) with DNS SRV record for IP, port, weight, etc. DNS server can even do health checks against the upstream (https://www.consul.io/docs/agent/dns.html ) so nginx will only get the "good" upstream servers. |
@millken for now the module only check DNS changes of servers configured on conf file at startup time, there is no integration with modules like dyups. @gfrankliu I don't know much about DNS SRV record, neither about nginx DNS queries internals, but I'm pretty sure that nginx does not support it, and since we use the core functions to discover the IPs, the module does not have support either. Do you know a client code that support it? I can take a look and see how complex is to implement the support. |
In nginx src/core/ngx_resolver.h, I see
I assume we can patch and add NGX_RESOLVE_SRV ? Once we get the IP, port, weight information from the DNS resolver, we can store them for nginx to use, for upstream connection? |
Here's one example, though using lua: |
Looks like nginx itself now supports SRV using "service" along with "resolve" in upstream server config: Here is the new nginx-1.9.13/src/core/ngx_resolver.h
I can see |
https://github.com/yzprofile/ngx_http_dyups_module
The text was updated successfully, but these errors were encountered: