nanog mailing list archives
Re: dns and software, was Re: Reliable Cloud host ?
From: Mark Andrews <marka () isc org>
Date: Tue, 28 Feb 2012 12:47:43 +1100
In message <CAP-guGVA4eHv0K=U=x2B-WPYDy2RQ7ZE1Di2AHc+dmA_huyGzA () mail gmail com>, William Herrin writes:
On Mon, Feb 27, 2012 at 3:43 PM, david raistrick <drais () icantclick org> wro= te:On Mon, 27 Feb 2012, William Herrin wrote:In some cases this is because of carelessness: The application does a gethostbyname once when it starts, grabs the first IP address in the list and retains it indefinitely. The gethostbyname function doesn't even pass the TTL to the application. Ntpd is/used to be one of the notable offenders, continuing to poll the dead address for years after the server moved.While yes it often is carelessness - it's been reported by hardcore development sorts that I trust that there is no standardized API to obtai=nthe TTL... =A0What needs to get fixed is get[hostbyname,addrinfo,etc] so programmers have better tools.Meh. What should be fixed is that connect() should receive a name instead of an IP address. Having an application deal directly with the IP address should be the exception rather than the rule. Then, deal with the TTL issues once in the standard libraries instead of repeatedly in every single application.
No. connect() should stay the way it is. Most developers cut and paste the connection code. It's just that the code they cut and paste is very old and is often IPv4 only.
In theory, that'd even make the app code protocol agnostic so that it doesn't have to be rewritten yet again for IPv12.
getaddrinfo() man page has IP version agnostic code examples. It is however simplistic code which doesn't behave well when a address is unreachable. For examples of how to behave better for TCP see: https://www.isc.org/community/blog/201101/how-to-connect-to-a-multi-homed-server-over-tcp Mark -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka () isc org
Current thread:
- Re: dns and software, was Re: Reliable Cloud host ?, (continued)
- Re: dns and software, was Re: Reliable Cloud host ? William Herrin (Feb 28)
- Re: dns and software, was Re: Reliable Cloud host ? Mark Andrews (Feb 28)
- Re: dns and software, was Re: Reliable Cloud host ? Joe Greco (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? William Herrin (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? Owen DeLong (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? Robert Hajime Lanning (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? James M Keller (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? Joe Greco (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? William Herrin (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? Jimmy Hess (Feb 29)
- Re: dns and software, was Re: Reliable Cloud host ? Mark Andrews (Feb 27)
- dns and software, was Re: Reliable Cloud host ? david raistrick (Feb 27)
- Re: Reliable Cloud host ? George Herbert (Feb 27)
- Re: Reliable Cloud host ? Paul Graydon (Feb 27)
- Re: Reliable Cloud host ? William Herrin (Feb 27)
- Re: Reliable Cloud host ? George Herbert (Feb 27)
- Re: Reliable Cloud host ? Jimmy Hess (Feb 29)
- RE: Reliable Cloud host ? Jason Gurtz (Feb 27)
- Re: Reliable Cloud host ? David Miller (Feb 27)