[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] lsocket - Another library for sockets in lua
- From: Sean Conner <sean@...>
- Date: Wed, 27 Mar 2013 18:23:41 -0400
It was thus said that the Great William Ahern once stated:
>
> IMO, a sockets library cannot be non-blocking if the DNS is blocking.
> Queries can often take several seconds to complete, or in some cases, never.
> If you're concurrently servicing 100 or 1000 open connections (or more!),
> blocking on DNS for 5 seconds, or just .5 seconds, is an absolute
> non-starter. I work at a networking appliance and "cloud" company, and this
> happens _all_ _the_ _time_, and almost invariably if the names aren't
> cached. Out-of-bailwick SOAs are the norm, and they dramatically increase
> resolution time.
>
> I don't have the time to fix the Win32 build (it worked once-upon-a-time),
> but you can try with this library:
>
> http://25thandclement.com/~william/projects/dns.c.html
Another DNS library is SPCDNS [1]. It's primary purpose is to encode and
decode DNS packets, which makes it rather easy to integrate into a project
with an existing network API instead of it (poorly) handling the network
activity. And it comes with Lua bindings.
-spc
[1] https://github.com/spc476/SPCDNS