how do I determine which server is closest?

Posted on 2007-07-24
Last Modified: 2012-06-21
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.
Question by:jbrahy
    LVL 6

    Expert Comment

    I never heard of that ... good luck
    LVL 6

    Expert Comment

    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
    LVL 1

    Author Comment

    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.
    LVL 39

    Expert Comment

    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.  
    LVL 10

    Expert Comment


    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
    LVL 15

    Accepted Solution


    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.


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now