Why don't many programming languages have real DNS client libraries built-in core? For example Python, Ruby and C# lack it.
You usually get only methods to get hostname out of IP or vice versa and only one record is returned. This then leads to building for example load balancing with only one IP which is seen by the world instead of pointing those IPs in DNS level.
Is this lazy DNS method/function the underlying reason why so much software fails if one of many hosts are down but all others are not in DNS perspective?
Email servers seem to get it right as they collect all MX records information (10 mail.domain.tld, mail2.domain.tld, mail3.domain.tld 20 backup.mail.tld) plus those mail.domain.tld could have many A records and try them all.
Is that one method relic from the times when the internet was small and there was no load-balancing and nobody cared to think there could be more of same kind of record? Are we programmers just too lazy to build retry logic?-)
dig, I guess. I'm not sure what you would do in other environments, though. Can you give some examples of this in the languages you named? I honestly haven't run into this problem and never thought about it (but I managed DNS servers for a couple of years). – lunchmeat317 Feb 26 at 21:03