On Thu, Jul 22, 2010 at 2:52 AM, Jesus Cea <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 21/07/10 21:20, P.J. Eby wrote: >> At 01:10 PM 7/21/2010 +0100, Paul Nasrat wrote: >>> Given the fragility of this it seems that we might want to consider >>> alternative mirrorlist discovery mechanism. >> >> As a fallback, you can of course probe addresses on a binary search, or >> even just select a random mirror in the first place. (If you overshoot >> the list, you just decrease the max on your binary lookup.) >> >> Non-random selection is tougher to implement, since you'd need to keep >> some kind of history to make it work effectively. Determining the >> length of the list is a trivial problem by comparison. > > Well a random shuffle is a standard operation in "random" module :-). > > What I usually do is to pick a random server and my previous selection > (the first time, you choose a second random server). Then do some > operations in BOTH and choose the faster. Complete the operation on it > and keep it for the next time. > > This way you always go the fast route, but randomly and gently probe > other nodes trying to find even other faster.
There's one more parameter to take into account I guess: the "freshness" of the mirror, e.g. when it was last synced. _______________________________________________ Catalog-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/catalog-sig
