linkedin/norbert — pull request #29 by sungjuc (2014-03-29 00:24:54+00:00)
Title: Fanout-control prototype

Prototyping work for fan-out controller that controls the degree of fan-out for scatter/gather requests. To do this, this changes add the DefaultClusteredLoadBalancerFactory to provide cluster aware load balancer. The DefaultClusteredLoadBalancerFactory assumes that all clusters are consists of multiple replicas and each replicas has multiple nodes. Each nodes has multiple partitions. Each replica consists of complete set of partitions. The DefaultClusteredLoadBalancerFactory also assumes that it can extract cluster information from node. Actually, user need to configure the function which extract the cluster information from node.

The basic idea of implementation is bounding degree of fan out by choosing nodes from given number of clusters. For example, if there are 10 clusters, Norbert normally fan out 10 * n nodes, where n is total number of nodes in one cluster. Unfortunately, there is no way of controlling this except Set-Cover algorithms. Since the Set-Cover algorithm uses the greedy approaches, actually, it doesn't have any capability of controlling the degree of fan-out. This implementation can provide more granular controls by limiting the fan out degree by the number of clusters * number of nodes.

Based on new load balancer factory, this expands the PartitionedNetworkClient by adding new APIs requires fan-out controlling.