From: Brian Candler Date: 2008-09-13T06:05:48+09:00 Subject: Re: Socket.getaddrinfo and IPSocket.getaddress super slow? > Anyone know why Socket.getaddrinfo and IPSocket.getaddress take up to 3 > seconds to return when the host doesn't have a record in DNS? They seem to do reverse DNS lookups on occasions where you might not want them to (e.g. finding the IP address to which a socket is bound). Try adding to the top of your program: require 'socket' Socket.do_not_reverse_lookup=true