I’m not sure where to put this on a Sunday, but the follow-up plan that was stated elsewhere has bitten me in the past. I thought I’d try to share some of my scars here from that approach, in the hopes that it would save some future headaches.
The problem
During the recent IPA upgrade, it was found that several apps had hardcoded a specific server, e.g. ipa03.
The proposed solution
It sounds like the plan is to put DNS in front of IPA so that clients can point to a single endpoint to reach all nodes in the cluster.
I think that’s the correct thing to do, but I wanted to caution that DNS is likely only half the story, and DNS alone can lead to other failure scenarios.
Pain
Clients of all types are notoriously ill-behaved when it comes to respecting DNS TTL. So let’s say some clients currently have the IP for ipa02 but it goes down or needs maintenance. You temporarily remove that host from the DNS record, but many clients (which can include intermediate routers etc) will either hold onto that record until they’re rebooted, or until they’ve reached their own internal TTL which completely ignores the DNS TTL. It’s pretty difficult to test for this so usually nobody does it, and even if they do it’s a constant game of whack-a-mole.
This is why in the http world DNS-based routing for reliability isn’t really a thing any more – we use http load balancers instead. (If all clients were correct, we wouldn’t need load balancers!)
Non-refundable $0.02
In addition to the DNS approach, I think we need to stand up an haproxy load balancer in front of IPA to avoid future issues. haproxy can do TCP-based load balancing, and it has option ldap-check to allow it to health-check LDAP backends and automatically stop routing to them when the health check fails.
I know this is extra work up front. But this way clients only need the DNS for haproxy, which stays stable, and thus you sidestep any issues with client DNS caching. Plus, future maintenance (planned or otherwise) has reduced toil, as you simply let haproxy notice when nodes go away and handle doing the right thing.
Hopefully this doesn’t sound like me telling you how to do your job! Just trying to tell ghost stories before the ghosts haunt anyone else.
