I implemented a first attempt at real load balancing in Fred this 
weekend. Anyone who is interested in trying it out can download a build 
> 602 and set "doLoadBalance=yes" in their config file. It uses the 
diagnostics, so that can't be deactivated (though IIRC we ignore that 
setting anyways). I will leave load balance off by default for now.

After spending the better part of the last two years trying to think a 
smart formula this, I settled on the most simple one possible: the 
probability of reseting the DataSource on a reply to point to you is the 
default value times the estimate of the global mean load divided by the 
local mean load (both in queries per hour). The justification behind 
this is simply that if we want a balanced network then references for 
each node should reach as many others: so if you send out half as many 
responses at the moment, you need to advertise yourself double as often.

On top of that, I added a modifier for absolute load of the node: it
multiplies the value by the ratio of requests not rejected because of
overload raised to five. This means that if a node is overloaded it
advertises a lot less. I did not add anything to make "underloaded"
nodes advertise more, but it should probably happen naturally as if
other nodes are overloaded and thus not advertising it will make the
"underloaded" nodes references more pervasive.

Finally, I am bounding the value above and below by 0.5 and 0.02. This 
is so we don't end up in a situation where a sudden shift in network 
traffic causes the network to degenerate completely. 

I have tested this on a node, with very good results - after activating 
it skipped up from 2-300 queries per hour served to hovering around it's 
estimate of the global means (3500) in an afternoon. It would be 
interesting to see what it does for others.

-- 

Oskar Sandberg
oskar at freenetproject.org

_______________________________________________
devl mailing list
devl at freenetproject.org
http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to