It's not always DNS, unless it is
medium.com
medium.com
In this case, there were NUMEROUS suboptimal or misconfigurations of DNS but none of them mattered until the volume reached a tipping point, and, suddenly, ALL of them came into play. Fixing one overflowed into the next, which overflowed into the next.
* Centralize - 1 tracking doc that describes the issue, timeline, what's been tested, who owns the incident. Have 1 group chat, 1 'team' (virtual or in person). Get an incident commander to drive the group.
* Create a list of hypotheses and work through them one at a time.
* Use data, not assumptions to prove or disprove your hypotheses.
* Gather as much data as you can, but don't let a particular suspicious graph lead you into a rabbit hole. Keep gathering data.
If you don't do the above you are guaranteed to have a mess, have to repeat yourself over and over and waste time.
And yes k8s world, dns fails more often than you think.
I hate coredns. Everything running inside of a kubernetes cluster should just be querying the kubernetes endpoints api for these IPs directly and using the node dnsservers for external hosts.
* dnsPolicy: Default
* enableServiceLinks: true (the default)
Then you can use MYDATABASENAME_SERVICE_HOST from the environment and there is no CoreDNS in the path at all.
Unless you want to also get rid of kube-proxy, in addition to CoreDNS; in that case you don't get ClusterIPs for services.
To be honest kube-proxy and CoreDNS are probably the only components I haven't had problems with on my cluster.
Wouldn't this put a huge load on the apiserver? Not to mention it's incompatible with software not designed for Kubernetes.
Isn't DNS built explicitly for this?
This might fix problems accidentally, at the cost of k8 dependency.
When they looked they saw all apps were not the same, and it was only a few kinds of apps that were affected.
When a big incident hits, you need people drilling down not just across; and hopefully people who know the actual apps in question.
Maybe this was DevOps people too far into the ops side and not as much on the dev?
The TTL is 2 seconds, but because the the app and the service always deploy together and always run on the same mode as one-another. So we deploy and this deploys both the app and the service to a new node, on which both will run.
But because TTL is so low, every new connection (traffic is pretty low for this particular app unlike some other apps in our cluster) is pretty certain to do another DNS lookup. And about 10% of the time we were getting connection error which boiled down to DNS.
So to confirm it was the problem we changed it to not do DNS lookup for now, since it’s as of now always same node for app and service.
But soon we are changing things around and they will no longer be guaranteed to run on same node nor will they deploy together.
So I still need to come up with something that let’s us do DNS lookups but not have the problem we’ve been having.
But it wasn't DNS. DNS didn't break. The protocol didn't break. Not even issues with the CoreDNS or dnsmasq implementations.
The culprit was ndots (why did Kubernetes arbitrarily choose five dots) and the general way that Kubernetes (ab)uses DNS.
I'm struggling with a problem where a VM is supposed to get an IP address from the host, but it takes forever to do so. The host is telling me it has assigned an IP, but the VM says it hasn't. It can take anywhere from 10-60 minutes for the VM to actually get the IP that the host has assigned.
I'd first answer that, then answer how the VM is supposed to get configured, then figure out how to break down/instrument the steps along the way.
And the default lease time is 60 minutes?
If you have decent TTLs dns doesn’t result in a shitstorm of lookups, nor does it require anything more powerful than a raspberry pi to respond to them
http://eureka-0.eureka.default.svc.cluster.local:eureka:8761/eureka
http://eureka-1.eureka.default.svc.cluster.local:eureka:8761/eureka
http://eureka-2.eureka.default.svc.cluster.local:eureka:8761/eurekaThis applies equally to any kind of lookup service you use. It's not a distinguishing feature of DNS.
The distinguishing features of DNS are that it's a global, highly regulated, key-value storage with only eventual consistency that may take days to reach. (It has probably never been consistent on practice.) None of those features are desirable for your internal servers configuration.
IPs are opaque and meaningless. Maybe you can keep in your head that “.2 is the database, .3 is the web server, .4 is the redis, .5 is the other api, .6 is the other database”, but I can’t and wouldn’t even if I could.
DNS is rarely the problem.
contains a lot of information outside of an external lookup.
It's the only thing you can guarantee will never change. The name points to exactly that server.
I’m all for DNS instead of IP’s, but we need to stop encoding too much information into names…
Makes me wonder what GP does with the plate when he finishes his dinner.
Cattle = paper plate
I'll let the reader make the connections
Get a sheet of paper. Draw a line down the middle. Put the IP in one column. Put the thing on it on the other side. Tape to wall, or put in binder.
>...but I can’t and wouldn’t even if I could.
>DNS is rarely the problem.
People that can't even be arsed to remember where their bits are on the other hand...
(You don't want L3 failover, trust me when I say it won't work as you expect.)
99.9% of the time.
I am feeling that caching all DNS responses for 30 seconds is not always the solution for all kind of usage patterns... Ah, generic solutions are for generic problems (which are usually not your problems).
I barked up the wrong tree for a while and then a more senior guy immediately found the issue. Anyways, now I grok this headline and have a new prank in my kit.
Might have been a quicker, easier "fix".
It's not always the Firewall -- unless it is :-)
I feel like I see what they're saying but I'm still confused at what's getting communicated. Just "sometimes DNS can actually be a source of problems?"
Episode 184 – It’s DNS. It’s always DNS
https://opensourcesecurity.io/2020/02/24/episode-184-its-dns...
If you look at a lot of outages and incidents, DNS is a common problem.
The title of the article doesn't convey what i would call useful information, but at least it checks out.
"It’s not always DNS — unless it is. "
Becomes :
"It’s always DNS — unless it isn't."
Ultimately they can both get interpreted as something like "It's DNS except if it isn't DNS." "DNS (NOT equal) (NOT DNS)" even. Not a super surprising statement.
So wording that statement either way has the same meaning, however the way the author worded it for the article title matches the chronological order of troubleahooting events (at first seemed to not be DNS, but later it turned out it actually was).