Hello Kudu Jenkins, Adar Dembo, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13266
to look at the new patch set (#6).
Change subject: KUDU-2791: TTL cache in DNS resolver (part 1)
......................................................................
KUDU-2791: TTL cache in DNS resolver (part 1)
Added TTL cache for the results of name resolution in DnsResolver.
Updated corresponding tests as well. A follow-up changelist will
add necessary plumbing in various places where it's beneficial to
use caching DnsResolver instead of HostPort::ResolveAddresses().
This changelist also introduces runtime flags which map into parameters
of the TTL cache used in DnsResolver. By default, the cache's capacity
is 1 MiByte, and its records' TTL is 15 seconds.
1 MiByte capacity is big enough to accommodate thousands of records.
>From the other side, it's low enough to avoid running an extra thread
for scrubbing the cache of expired records, allowing the cache to purge
expired records only when it is at capacity.
Record's TTL of 15 seconds is half of the minimum recommended as stated
by various 'best practices': 30 seconds for DNS A records
(see [1] -- [4] below). Kudu masters and tablet servers are not
supposed to run behind a load balancer, so 15 seconds TTL for a cached
DNS A record seems to be good enough in the context of running a Kudu
cluster.
[1] https://ns1.com/knowledgebase/ttl-best-practices
[2] https://serverfault.com/questions/7478/recommended-dns-ttl
[3] https://support.google.com/a/answer/48090?hl=en
[4] https://ns1.com/blog/what-is-the-lowest-ttl-i-can-get-away-with
Change-Id: Ia1bbd55a8231fd541d2087f9202f24e80bc79f0b
---
M src/kudu/client/client-internal.cc
M src/kudu/client/client-internal.h
M src/kudu/client/client.cc
M src/kudu/client/meta_cache.cc
M src/kudu/util/net/dns_resolver-test.cc
M src/kudu/util/net/dns_resolver.cc
M src/kudu/util/net/dns_resolver.h
M src/kudu/util/net/net_util.cc
8 files changed, 233 insertions(+), 60 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/66/13266/6
--
To view, visit http://gerrit.cloudera.org:8080/13266
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia1bbd55a8231fd541d2087f9202f24e80bc79f0b
Gerrit-Change-Number: 13266
Gerrit-PatchSet: 6
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Todd Lipcon <[email protected]>