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

Chevaris commented on ZOOKEEPER-571:
------------------------------------

I have experimentally used 
cf.getZookeeperClient().getZooKeeper().getTestable().closeSocket() to 
periodically close the connections and eventually achieve balance connections 
between servers (making it periodically and with some dispersion.

I have NOT found any single problem in this approach.

Can we start making this method as a public API in order to support this use 
case?

> support balancing of client load across servers in an ensemble
> --------------------------------------------------------------
>
>                 Key: ZOOKEEPER-571
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-571
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: quorum, server
>            Reporter: Patrick D. Hunt
>            Priority: Major
>
> Currently the ensemble does not ensure a balanced load across servers in an 
> ensemble. Clients randomly connect to
> a server, which typically balances the number of sessions. However there are 
> problems with this:
> 1) session count is balanced, but not session load
> 2) if server A goes down all of the sessions on that server migrate to other 
> servers in the cluster randomly, this is fine, however
> when server A comes back into service it will have no sessions, and migration 
> of sessions from other servers may take time
> The quorum should probably have some way of broadcasting load, and 
> occasionally re-balance the sessions based on
> this information. Might be tricky though, want to ensure that we aren't 
> constantly ping-ponging sessions to servers.
> Probably need some hysteresis as well as limit the frequency. Real time 
> tuning would need to be supported.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to