The title already tells what I want. Think about this example.
I want to download ubuntu ISO. I go to Ubuntu site and get the list of mirrors. There I found my neighbor country has a mirror hosted. So I select that mirror which is geographically closest to my country. Start downloading. But I get very slow speed. Now one of my friend tells me to select a different mirror which is actually geographically far away from me. But now I am getting good speed.
Now in linux how can I find the fastest mirror? I have a list of hostnames in a text file like
host1.net
host2.net
mirror.host3.net
I see the same functionality in Ubunut's mirror selection dialog. I tried ping
on every host and save the time. Then I choose host with the lower latency. But its not speedy. Its closeer.
Find a file on the servers, preferably in a known location. Download the first 16kiB. Time it. Pick whichever one takes the least time.