This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nscd/15862] nscd doesn't cache record containing more than one IP address.


https://sourceware.org/bugzilla/show_bug.cgi?id=15862

Alexandre Oliva <aoliva at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at sourceware dot org

--- Comment #1 from Alexandre Oliva <aoliva at sourceware dot org> ---
AFAICT, current cache handling *can* handle multiple addresses, and this was
true in 2.12 as well.  I'm a bit concerned earlier versions might fail should
they find multiple addresses in the mmapped cache, but since they could always
handle multiple addresses in (not cached) responses from nscd, I'm inclined to
think it wouldn't be a problem to remove the tests for a single address
throughout nscd/hstcache.c.

That said, such a change, by itself, would remove load balancing, whereas
consulting a (caching and presumably close) name server retains load balancing
without too much of a performance penalty.  I suppose this was the driving
factor for not caching answers with multiple addresses.

One oddity is that getaddrinfo *does* cache multiple addresses, and if it is to
be a modern replacement for gethostbyname, the same considerations should
apply.

Furthermore, it is very weird that getaddrinfo will cache multiple answers in
all but AF_INET non-AI_CANONNAME requests, because this combination in
getaddrinfo is implemented in terms of gethostbyname2_r.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]