download problem
Francois Petillon
fantec at proxad.net
Thu May 15 14:19:35 UTC 2008
Debarshi Ray wrote:
> Say A, B and C are mirrors having bandwidth of x,y and z Mbps
> respectively. So lets have an array which has: A, A, A... (x times),
> B, B, B... (y times), C, C, C... (z times), and then generate a random
> number within [0, x+y+z] and use that as an index to fetch a mirror
> from the array.
No, your array should be something like :
([A,x];[B,y];[C,z])
and when you pick your random number within [0,x+y+z], you parse the
array decreasing your random number until it is less than the current
server bandwidth (unless your array is kept static, it would be more
costy to generate it (its length will be the sum of server bandwidth)
than to parse a server list).
But as far as I am concerned, I would prefer giving back to the user a
list of nearby servers links (which may be picked bandwidth-randomly) in
which the user would choose a server by itself.
François
More information about the Fedora-infrastructure-list
mailing list