how do I determine which server is closest?

how do I programatically determine which ftp server is the closest and which server is the fastest out of a list of ftp servers? Is there a program that does it already? I'd like to use Perl or C# to figure it out.
Who is Participating?
markpalinuxConnect With a Mentor Commented:

download which has a script -

It uses the following modules
use strict;
use Socket;
use Time::HiRes qw(gettimeofday);

Then you can use it like this:
" server1 80"
results show up as

I am sure you could use the code the script to get the server which has the fastest response time - like others have said above the closest server might not be the fastest, and depending on QOS  the fastest to respond ftp sever might not be the one you would get the fastest file xfer from.

I never heard of that ... good luck
TCP/ip has no knowledge about geographic point.
The routes that packets follow change in function of the traffice.
Due to the traffic It is very difficult to know wich server is the faster. It depend of the traffic and also of the load of the cpu ...

I don't think you can know that by consitent way
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

jbrahyAuthor Commented:
I was thinking since it's a ftp server that the least I could do was download a file that is on all servers and measure the download speed. but I was thinking there should also be a way to do something with a traceroute or bing type algorithm.
tracert will tell you the route - it is possible a longer route could be faster.  But you could try that.

Ping will tell you round-trip-time.  This might be a good indication of speed, but not always.  

use above link will help to provide zipcode for your ftp IP and you know your Zip right.

Now find the distance between this two zip

you will know which ftp server is near to you

hope you are in US
Thanks & Regards
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.