Skip to content
ankitkinra edited this page May 11, 2012 · 3 revisions

Idea

The idea is to make LoadBalancer extendable by choosing your own criteria.

Current LoadBalancer

But the current execution contains only one kind of LoadBalancer called HotspotLoadBalancer. This extends from the DefaultLoadBalancer.

Execution

HotspotLoadBalancer is an abstract class and is further extended into ReadHotSpotLoadBalancer and ModifiedReadHotSpotLoadBalancer. These two subclasses differ only in the strategy of load calculation which is defined in ReadHotSpotRegionLoad and ModifiedReadHotSpotRegionLoad. Now I could have done away with two sub classes and simple extended the load calculating classes, but I kept scope for future changes. Now right now I calculate metrics based on the raw metrics, but I guess without the sliding window accumulative strategy, load balancing will be difficult.

Clone this wiki locally