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.
LVL 1
jbrahyAsked:
Who is Participating?
 
markpalinuxConnect With a Mentor Commented:


download scripts.zip which has a script - tcp_response_time.pl
from
http://forums.cacti.net/about11020.html

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

Then you can use it like this:
"tcp_response_time.pl server1 80"
results show up as
"avg:0.0327129364013672"

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.

Mark
0
 
PHDCommented:
I never heard of that ... good luck
0
 
PHDCommented:
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
0
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.
0
 
Adam314Commented:
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.  
0
 
SystemExpertCommented:
Hi,

http://www.ipgeo.com/tools/

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