Multiple servers in backend URL causes unnecessary DNS lookup

Issue #98 closed
Bjoern Teipel
created an issue

Hi folks,

I'm using dogpile.cache.memcached in a OpenStack/Keystone scope and noticed when we do configure a backend URL including multiple hosts, for example:

url:172.29.237.236,172.29.238.219,172.29.239.40:11211

I do see quite a lot of failed DNS lookups for the invalid DNS name:

172.29.237.236,172.29.238.219,172.29.239.40.

which I have captured with the pcap dump: 10:06:27.923726 IP keystone_container-db00cc3b.43267 > 10.0.3.1.domain: 61056+ A? 172.29.237.236,172.29.238.219,172.29.239.40. (61) 10:06:27.923803 IP 10.0.3.1.domain > keystone_container-db00cc3b.43267: 61056 NXDomain 0/0/0 (61)

Once I do configure real host names, resolvable by DNS, I do not see even attempts to resolve those names and the dogpile memcache backend is not functioning at all. At this point I can not tell if the problem is with dogpile or python-memcache. Personally I think the issue seems to be inside the memcache library since that one is actually making the sockets.

What do you think?

Comments (4)

  1. Michael Bayer repo owner

    you guessed correctly, dogpile.cache only makes a top-level call to memcached here and memcached goes off and does the rest. There's no hostname lookup or socket logic in dogpile.cache.

    I'd say this issue is w/ the upstream memcached library and/or Keystone's choice of driver (pylibmc would work best).

  2. Michael Bayer repo owner

    that is unless, there's some magic flag to make memcached do the right thing you want here, and dogpile.cache needs to allow this to be set. which seems unlikely here.

  3. Log in to comment