Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22685 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64109 invoked by uid 1010); 7 Apr 2006 19:51:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64093 invoked from network); 7 Apr 2006 19:51:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2006 19:51:42 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:1064] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3B/01-09839-DC2C6344 for ; Fri, 07 Apr 2006 15:51:41 -0400 Received: from localhost ([127.0.0.1] helo=peiscg33m) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1FRwQD-0004cM-00; Fri, 07 Apr 2006 12:15:05 -0700 Message-ID: <004101c65a7c$ae9431b0$5c8be5a9@ohr.berkeley.edu> Reply-To: "Sara Golemon" To: "Eric Coleman" Cc: References: Date: Fri, 7 Apr 2006 12:51:37 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003E_01C65A42.0205BE30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Re: gethostbyname vs. dig From: pollita@php.net ("Sara Golemon") ------=_NextPart_000_003E_01C65A42.0205BE30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable One possibility is that the first nameserver in your resolv.conf is = slow/broken and gethostbyaddr() (which is typically synchronous) has to = wait for it to timeout before moving on. dig, by contrast, will usually = send out the request to all your NSs at once and use whatever reply = comes back first. -Sara ----- Original Message -----=20 From: Eric Coleman=20 Newsgroups: php.internals To: PHPdev=20 Sent: Friday, April 07, 2006 7:42 AM Subject: gethostbyname vs. dig Don't mean to piss anyone off or ask a question that doesn't belong =20 here but here it goes: I wrote a script to check that domains resolve to our ip's. I =20 noticed, that using gethostbyaddr() is significantly slower than using dig domain.com A +short Just curious as to why this is. Eric ------=_NextPart_000_003E_01C65A42.0205BE30--