-
Notifications
You must be signed in to change notification settings - Fork 695
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
Define carbon servers by hostname #186
Comments
Note for the patch maker: the new behaviour should be triggered by an option (like --carbon-name-resolve/--carbon-resolve-names/...). Generally uWSGI does not resolve names, so we need to continue such default behaviour. The uWSGi function for resolving names is: char *uwsgi_resolve_ip(char *domain); the returned string is overwritten everytime the function is called (it is a static buffer) so there is no need to free it |
Should we retry if hostname can't be resolved? Currently retries are done only on connect errors to minimize gaps. |
I mean we will try again to resolve hostname and send metrics, but in next cycle, not after just few seconds like with connect errors. |
I agree with that behavior (retrying resolve on next cycle) |
Side note: uwsgi_resolve_ip() return always the first IP from hostname, so to have working round robin DNS server needs to return records in random or cyclic order |
i think i can write an uwsgi_resolve_ip2(char *ip, uint8_t *attempt); basically attempt is a suggestion to the function to use a specific item. When a resolve fails, attempt is incremented (forcing the function to try the next one at the next iteration). I will work on that tomorrow. |
Currently can only use ip:port
This will allow the use of round-robin DNS as primitive load-balancing many carbon-relay/caches
Or makes it easier to move carbon-cache/relay to another node
Definitely wouldn't recommend this without a local recursive dns caching daemon (unbound, tinydns, dnsmasq)
The text was updated successfully, but these errors were encountered: