[erlang-questions] Number of dns resolvers

Geoff Cant nem@REDACTED
Mon Mar 1 22:24:13 CET 2010


Konstantin Sorokin <kvs@REDACTED> writes:

> Hello!
>
> How do I control number of dns resolvers in Erlang VM ? As far as I
> can see by default there are only 4 DNS resolvers (inet_gethost port
> processes) and if my app performs massive DNS lookups in many parallel
> processes then I probably should increase that number, right ? Are
> there any other parameters that I can tweak to increase DNS lookup
> speed ?

There seems to be an undocumented? kernel configuration parameter
'gethost_poolsize'::non_neg_integer() that specifies this.

As an alternative to using the c resolver (the 'native' resolver) you
could use OTP's erlang DNS client - the 'dns' resolver.

Specifying "{lookup, [dns]}." in your inetrc should do that (and erl
-kernel inetrc '"/some/path/inetrc"'). I don't think there's any
concurrency limit on it except the number of udp sockets you can open.

Cheers,
-- 
Geoff Cant


More information about the erlang-questions mailing list