Repository navigation
Incorrectly formatted FQDN's to googleapis.com #2213
Description
Activity
PR #2214 opened
Hi @ericuldall,
Thanks for reporting.I am not going to make the change suggested in #2214 for the reasons I covered there. However, you can continue to use this in your own implementation by specifying your
baseUrldirectly:new BigTable({ baseUrl: '...' });
I understand your concerns. I would highly suggest putting a warning for people using this library in a kubernetes cluster with a large number of http requests as the internal kube-dns will drop lots of requests without the trailing dot. This is because in the kubernetes resolve.conf they use a large number of ndots to check for internal services.
resolv.conf sample:
search default.svc.cluster.local svc.cluster.local cluster.local google.internal c.project.internal nameserver 10.20.30.40 options ndots:5One of the main problems is the setting:
sysctl -w net.netfilter.nf_conntrack_max=65535
That table is of a finite size per host machine and if it overflows, requests get dropped (this shows up asgetaddrinfo ENOTFOUND, errors). Using the trailing dot seems to be an easy remedy to avoid all the internal lookups and bypass the problem completely.Another option is to set the pod dnsPolicy,
DnsPolicy: Defaultin the pod spec.We will move forward creating instances with the overridden
baseUrlfor our needs. Thanks for looking into this.Hmm, I understand. Let me think on this more and discuss it internally and see if my position changes. (It might.)
Reacted by Eric UldallDue to an issue brought up in #2249, we're going to revert this change.
I've noticed all of the references to the Fully Qualified Domain Name "googleapis.com" are incorrectly formatted. Per RFC 1034 FQDN's should have a trailing dot in order to remove any ambiguity and unnecessary lookups.
Explanatory documentation HERE
We were pointed to this doc by a Kubernetes network engineer at Google after having many DNS lookup issues inside of our GKE clusters. After running some tests we noticed a minimum 100ms improvement per request after adding the trailing dot.
I have a PR ready that I will post for review.