-
Notifications
You must be signed in to change notification settings - Fork 1.2k
write_tsdb plugin: Prevent DNS flooding on connection error. #2059
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
Conversation
=item B<DNS_Random_Cache_TTL> I<ttl> | ||
|
||
When Collectd connects to a TSDB node, it will request the DNS. This can become | ||
a problem is the TSDN node is unavailable or badly configured because Collected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collected
will request DNS in order to reconnect for every metric, which can flood your DNS. | ||
So you can cache the last value for C<ttl> seconds (default: 600s e.g; 10 min). | ||
When I<collectd> connects to a TSDB node, it will request the DNS. This can | ||
become a problem if the TSDN node is unavailable or badly configured because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TSDN->TSDB
request the DNS at the same time when the connection fails. Default value is | ||
15 * the write_tsdb interval (or the global interval if write_tsdb interval is not | ||
defined). | ||
You can also define a jitter, a random interval to wait in addition to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would instead suggest calling this a "splay" in both config param and documentation, but just a minor nit.
* Rename ->sock_info to ->ai. * Use cf_utils_get_cdtime() to parse time options. * Optimize away the use_dnsrandomttl global variable.
Also rename the global variables to match the config options.
The defaults have been set to the more reasonable 1*interval.
Since it got buried in the commit diff, I suggest splay in place of jitter for describing the option but otherwise LGTM |
As a non-native english speaker I've had to look up splay, so jitter sounds better. |
I stole splay from cfengine, which seems to have spread it to Chef and Salt |
Alright, we're going to stick with "jitter" then. |
No description provided.