Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 123962

Summary: [downloads] Get country information from web client and sort mirrors accordingly
Product: Community Reporter: Eclipse Webmaster <webmaster>
Component: WebsiteAssignee: phoenix.ui <phoenix.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: kim.moir, pombredanne, richkulp
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eclipse Webmaster CLA 2006-01-16 09:25:25 EST
download.php now supports ordering mirror sites according to the countryCode parameter (bug 117494) so it would be good to get ANSI Country code from the client to sort list of mirrors accordingly.

I see three methods (best first):

- use something like GeopIP to match the client's IP address to country.  This would likely be the most accurate and painless for the user.

- use a drop-down box on download.php asking the user to supply their contry information and set a cookie on the browser.  If a cookie is set, don't display the drop-down.  Would be somewhat accurate if user responds correctly, but it requires user input.

- parse the hostname and get the country code.  This would require running reverse DNS lookups for each client and wouldn't be all that accurate

D.
Comment 1 Eclipse Webmaster CLA 2006-01-20 11:54:05 EST
Additional concerns and information:

> I have a question about this that you just announced in the bug I've 
> been following about update sites. Randomly choosing sites within a 
> country might be ok for smaller countries, but for the US there are 
> quite a few sites, some not so close.

Distance is not the biggest factor here, Internet backbone connectivity is. A user in Californina downloading from New York won't feel any pain whatsoever.  In some cases, a user in Sunnyvale will have faster access to a mirror in New York than one in Seattle.

The backbones of large american Tier-1 providers, like Sprint, MCI's, AT&T and Qwest are one bigass LAN (pardon my french) so the pain of trying to contain a download in the same timezone yields very little benefit.

Have a look at these maps:
http://global.mci.com/about/network/global_presence/northamerica/
http://www.sprintworldwide.com/english/maps/
http://www.qwest.com/about/qwest/network/


> Plus there is our local shadow 
> fullmoon which we would want to use over any other mirror.

Local mirrors will be taken into consideration before country information.


> So how can we handle this where we do want a specific mirror if it is 
> going to be automatic.

The mirror selection page will remain, a "Now downloading from " will display, and the "Save as" dialog will appear. Let me prototype this first, it'll be easier to explain.

D.
Comment 2 Eclipse Webmaster CLA 2006-01-25 14:32:56 EST
I have a test version of download.php that uses GeoIP to select the best mirror according to the client's IP address.

As per comment 1, I decided to not perform an automatic redirection.

The list of mirrors is ordered best->worst, according to the countryCode (either supplied, or looked up).  The first mirror is a random mirror in the same country followed by a randomly sorted set of mirrors in the same continent.  If there are no mirrors in the same country, the mirrors in the same continent are sorted randomly.

If client's hostname matches an internal mirror, the internal mirror will always be first, then the country, then continent...

You can test these URLs (hit refresh to see the list change):

No countryCode specified, looked up via GeoIP.
http://phoenix.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-SDK-3.1.1-linux-gtk.tar.gz

countryCode=us, override GeoIP
http://phoenix.eclipse.org/downloads/download.php?countryCode=us&file=/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-SDK-3.1.1-linux-gtk.tar.gz

countryCode=de - three German mirrors top the list, then european mirrors random
http://phoenix.eclipse.org/downloads/download.php?countryCode=de&file=/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-SDK-3.1.1-linux-gtk.tar.gz

countryCode=nz - no mirrors in nz, so list Autralian mirrors first
http://phoenix.eclipse.org/downloads/download.php?countryCode=nz&file=/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-SDK-3.1.1-linux-gtk.tar.gz

countryCode=xx - GeoIP failed to lookup the countryCode, so no mirror is proposed, mirrors are sorted alphabetically by continent,country
http://phoenix.eclipse.org/downloads/download.php?countryCode=xx&file=/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-SDK-3.1.1-linux-gtk.tar.gz

Just give me SDK and Webtools from the mirror(s) you think is best:
http://phoenix.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-SDK-3.1.1-linux-gtk.tar.gz
http://phoenix.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R-1.0-200512210855/wtp-all-in-one-sdk-1.0-linux-gtk.tar.gz

Just get me this plugin from the mirror(s) you think is best:
http://phoenix.eclipse.org/downloads/download.php?r=1&file=/eclipse/updates/3.1/plugins/org.eclipse.wst.sse.core_0.7.1.jar



Once this has been tested, the download.php will be made Live.

D.
Comment 3 Eclipse Webmaster CLA 2006-01-26 15:59:44 EST
Closing as FIXED.

download.php uses GeoIP to sort the mirrors list according to the client's country.

D.