You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Raul Gutierrez Segales (JIRA)" <ji...@apache.org> on 2014/07/29 21:22:39 UTC

[jira] [Commented] (ZOOKEEPER-338) zk hosts should be resolved periodically for loadbalancing amongst zk servers.

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14078208#comment-14078208 ] 

Raul Gutierrez Segales commented on ZOOKEEPER-338:
--------------------------------------------------

I think this isn't true after ZOOKEEPER-107, in a bad way. I've just noticed that we call getaddrinfo from zookeeper_interest... on every call. So from zookeeper_interest we always call update_addrs:

https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L2082

which in turns unconditionally calls resolve_hosts:

https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L787

which does the unconditional calls to getaddrinfo:

https://github.com/apache/zookeeper/blob/trunk/src/c/src/zookeeper.c#L648

We should fix this since it'll make 3.5.0 dramatically slower. 
 





> zk hosts should be resolved periodically for loadbalancing amongst zk servers.
> ------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-338
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-338
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: c client, java client
>    Affects Versions: 3.0.0, 3.0.1, 3.1.0
>            Reporter: Mahadev konar
>
> The list of host names passed to ZK init method is resolved only once. Had a corresponding DNS entry been changed, it
> would not be refreshed by the ZK library,effectively preventing from proper load balancing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)