------ art_12641_25446713.1156328603311 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/23/06, why the lucky stiff <ruby-talk / whytheluckystiff.net> wrote: > > Net::HTTP suffers from: its DNS lookup is not asynchronous and will block > your > process. To overcome that, you'll need c-ares[1], which will probably > also need > to be wrapped as an extension. > > In my experience, Net::HTTP actually performs much better when you use > Ruby's > non-blocking DNS resolver: > > require 'resolv-replace' > > I wrote a cURL extension and benchmarked it against Net::HTTP with > resolv-replace and wasn't completely impressed with the speed difference, > so I abandoned the extension. slightly offtopic: Why, have you read through resolv-replace? What's the magic to it? If all it does is to run DNS queries asynchronously, then don't you need to be running threads in your program in order to get any benefit from it? I've found that DNS lookups in Ruby are a total performance killer and I've been looking at writing a bind-cache or a new DNS client altogether just to get around this problem. ------ art_12641_25446713.1156328603311--