Obsolete:Media server/rebalance
rebalance URL gets executed on each node with sufficient permissions to create subdirectories and files in the web root. It gets executed with a URL as a parameter. The contents of the URL specify the desired configuration of the cluster, naming nodes and hashes that the node should be responsible for in the future. Rebalance compares the current state of the node's hashes against the desired set of hashes. If any are missing, it runs wget -m against one of the existing servers for that hash. When wget finishes, rebalance registers that hash with the DNS servers.
rebalance --check computes the md5sum for every file in the hashed subdirectories and deposits in the hash level as a file named "md5sum".
rebalance --cleanup looks at every hashed subdirectory for which it is not listed in the DNS. It looks at the ones that are listed, fetches their md5sum files, and compares them against its own md5sum. For each file, if there are two other identical copies, it deletes its own copy.
The design of this rebalancing system is not to be efficient of machine time, but instead efficient of sysadmin time. Between each step, the results can be compared against reality. As we come to trust it, we can automate its steps.