killme2008 / xmemcached

High performance, easy to use multithreaded memcached client in java.
http://fnil.net/xmemcached
Apache License 2.0
757 stars 280 forks source link

InetSocketAddressWrapper always request to resolve hostname #135

Closed fooling closed 2 years ago

fooling commented 2 years ago

Xmemcached resolves hostnames of memcached server IP address on initialization.

net.rubyeye.xmemcached.utils.InetSocketAddressWrapper#InetSocketAddressWrapper

When an IP record is not exists in DNS server, and retry is configured in /etc/resolve.conf

$ cat /etc/resolv.conf options timeout:1 attempts:5 nameserver 100.0.0.1

This mechanism may cause client hang for a long time on starting.

fooling commented 2 years ago

Just realized it is already fixed in 2.4.7