Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

tbrock gave the work-around, but as for the "why", it's probably because Debian uses glibc for its libc, while Alpine uses musl. musl aims to be a much more compliant libc than glibc, so when you tell it to look up a name, it probably always does so. Like tbrock said, installing a local dns cache should help (or, failing that, an /etc/hosts entry?).


Ah ok..

My apk list looks something like

            gcc \
            make \
            libc-dev \
            musl-dev \
            linux-headers \
            pcre-dev \
            postgresql-dev \
            zlib-dev \
            jpeg-dev \
            libxslt-dev \
            libxml2-dev \
            git \

so I see musl but glibc in there....

I do not think I want to do the /etc/hosts thing, as the IP can change for some things.. I would rather just cache it locally for ? 1 minute or something


Its probably just nscd that is caching dns requests on debian not glibc. Though I thought nscd dns ttl caching was broken there. I could be wrong.

Musl libc's dns strategy should actually be faster than glibc when its used.

https://wiki.musl-libc.org/functional-differences-from-glibc...

That said a local cache would be ideal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: