Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31558

Re: bad httplib latency due to IPv6 use

From Roy Smith <roy@panix.com>
Newsgroups comp.lang.python
Subject Re: bad httplib latency due to IPv6 use
Date 2012-10-17 20:28 -0400
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <roy-B546E3.20284717102012@news.panix.com> (permalink)
References <1s42l9-9al.ln1@satorlaser.homedns.org> <eil2l9-nhm.ln1@satorlaser.homedns.org>

Show all headers | View raw


In article <eil2l9-nhm.ln1@satorlaser.homedns.org>,
 Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> wrote:

> Some updates on the issue:
> 
> The etc/hosts file contains the following lines:
> 
> # localhost name resolution is handled within DNS itself.
> #       127.0.0.1       localhost
> #       ::1             localhost
> 
> As I understand it, those effectively mean that localhost is not 
> resolved via this hosts file but "within DNS itself", whatever that 
> exactly means.

The path from hostname to IP address is a long and tangled one.  It 
starts with a call to getaddrinfo().  From there, the details depend on 
a wide variety of decisions made by whatever idiots designed, installed, 
and configured your operating system.

One likely path is to check in /etc/nsswitch.conf to see what data 
sources the resolver should consult.  On the box I'm using at the 
moment, it says:

hosts:          files dns

which is pretty typical.  That means, first look in [some set of static 
files, which usually, but not always, means /etc/hosts], and if you 
don't find it there, ask DNS.  Other possibilities include NIS, NISPLUS, 
and maybe some other perverse things.

And, finally, you get to DNS, so now you have to look in (probably) 
/etc/resolv.conf.  I see on my linux box, even that has grown more 
tendrils; there's a whole /etc/resolvconf *directory* full of more 
config files which describe additional ways somebody could have 
misconfigured this mess.

Personally, if I were you (and assuming you don't have some corporate IT 
nazis to deal with), I would just put localhost in /etc/hosts and be 
done with it.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

bad httplib latency due to IPv6 use Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-10-17 09:55 +0200
  Re: bad httplib latency due to IPv6 use Hans Mulder <hansmu@xs4all.nl> - 2012-10-17 11:37 +0200
    Re: bad httplib latency due to IPv6 use Chris Angelico <rosuav@gmail.com> - 2012-10-17 20:44 +1100
    Re: bad httplib latency due to IPv6 use Laszlo Nagy <gandalf@shopzeus.com> - 2012-10-17 11:58 +0200
  Re: bad httplib latency due to IPv6 use Roy Smith <roy@panix.com> - 2012-10-17 08:17 -0400
  Re: bad httplib latency due to IPv6 use Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-10-17 14:40 +0200
    Re: bad httplib latency due to IPv6 use Chris Angelico <rosuav@gmail.com> - 2012-10-18 00:32 +1100
    Re: bad httplib latency due to IPv6 use Roy Smith <roy@panix.com> - 2012-10-17 20:28 -0400
      Re: bad httplib latency due to IPv6 use Chris Angelico <rosuav@gmail.com> - 2012-10-18 14:42 +1100

csiph-web