> 2) When the client issues the call "Where is file $x?" and it gets > back a list of locations, does the tracker reply back in random order? > Or is it always the same? Is it expected that the client take the list > and randomize them too? Just wondering - if the server always replies > with "$x is on $y" in the same order and the client always picks the > first one, that means one server is being hit more often than the > other. Seems like it would be nice to randomize it (or even smarter > adding in some better intelligence based on connections/load/etc, but > random is probably good enough) - I haven't looked at the docs/code > about this specifically but figured someone could answer it pretty > quickly.
It's weighted by a few things: - Nodes that are down are removed. - If IO monitoring is working, the list of paths are sorted, in order of least busy nodes. - If no_verify=0 is set in the get_paths call, paths returned are only ones which have a valid HEAD response on the storage node. For performance reasons it's generally a good idea to set no_verify=1. Unless you cannot return paths that could potentially be missing/wrong/broken/etc. -Dormando
