• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

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.
1 Solution
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
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.
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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

download scripts.zip which has a script - tcp_response_time.pl

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

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.


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now