Specifications
MBG Engineering Guidelines, Release 8.0
By default all MiNet sets will be associated with the default zone. By editing the set, the set may have its affinity
changed to a different zone. The implications of this are as follows:
• A set’s load-balancing list of nodes will always favor nodes in its zone
• The last entry in the load-balancing list will be a node from the default zone
This feature was introduced to support geographically dispersed clusters. For example, if there are three servers
in North America and three in Asia, it makes little sense for Asian sets to be load balanced to North America
unless all of the Asian servers are unreachable. Using cluster zones, a “North America” zone and an “Asia” zone
could be created, and sets in Asia could be placed into the Asian zone. The sets in each region would then
prefer the nodes in their region, reducing network latency and bandwidth use.
Similarly, zones can be created to segregate devices by function, such as keeping trials users on a
separate node from regular users, or to split users by organizational group.
10.3 Node Weighting
Not all servers are created equal. If the hardware in the cluster is all equivalent, it is safe to leave the weight of
each node in the cluster at its default value of 100. This ensures evenly-distributed load balancing.
To inform the cluster that a given node should handle more than an equal share of the load, increase its weight.
If the server should handle less, lower the weight. For instance, assume there is a cluster of three nodes with
weights of 50, 50, and 100. The two smaller servers (lower weights) will each handle roughly one quarter of the
total load, while the third server handles the remaining half of the load.
Weights are not percentages
3
; they are simply a ratio of relative server power. Weights of 100,100,100 are
equivalent to weights of 1,1,1. However, if the sum of all weights is 100 (or close to it), they can be treated as
percentages of the total load and the system will behave as expected.
A weight of zero prevents any devices from connecting and will cause MBG to move all connected devices to
other nodes.
Expressed mathematically, the above is simply:
sets_on_a_node = total_sets x ( node_weight / sum( node_weights ) )
Note: the distribution of devices will not be mathematically perfect. Some hysteresis is built in to the load-
balancing algorithm to prevent devices from being redirected too often in a vain attempt to perfectly balance the
cluster.
Note that weighting applies to zones, not to clusters. The “total load” is the load from devices configured with
the same zone as the node. (In a cluster with only the Default zone, this distinction can be ignored.)
As an example, consider a cluster with five nodes and two zones. Two servers are in the “North America” zone
and two servers are in the “Asia Pacific” zone. The remaining server is left in the Default zone.
The two North America servers are identical and have weights of 10. Each one will handle roughly one half of the
total load of devices configured for the North America zone. One of the Asia Pacific servers is new and has more
capacity; it has a weight of 20 and the other server has a weight of 10. The newer server will handle twice as
much load (roughly two thirds) as the other server (one third). The fifth server handles 100% of the load in the
Default zone, regardless of its weight.
Warning: not all devices can be load-balanced. See Additional Considerations for details.
3 Note that using “total_sets = 100” in the formula below gives the percentage of total load handled by one node.
34










