[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: download problem

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 :
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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]