As of July 2nd, 2021 visiting ethoslab.world/dl will automatically redirect you to the closest server/mirror based on your current physical location. However, the method used isn't ideal and I will attempt to explain why.
Keep in mind that this whole page will become quite technical; I'll mention a bit about internet networking and maybe add some code snippets. There's also a very good chance I'll just start rambling. You've been warned π.
I also want to mention that anyone can access each server directly if they so want to. The automatic redirect is primarily to make it easier for people, as they may not know which one to select. If you're in the US, but you absolutely want to download from Australia, nothing prevents you from doing so :)
I'll start with some short descriptions of the current setup.
I recently migrated the main website to Cloudflare Pages, since it's fully static and that means it should stay up even if my Norway server went offline for any reason (where it was previously hosted) and load slightly faster worldwide. In addition to Cloudflare Pages, I am also utilizing the Cloudflare Workers platform. A "worker" is what is used to automatically redirect users (you) to the "closest node".
Every single server/mirror (which I will refer to as a "node") has been assigned coordinates. These coordinates are approximate based on the city the server provider has given me. Each node has also been assigned a country (with the exception of the US nodes) and continent. US nodes have been separately assigned cities (currently "Las Vegas" and "New York City").
When you visit ethoslab.world/dl, your browser request hits a "worker" (script) I've written. The worker will then extract information from the request object, provided by the Cloudflare Workers platform. In this request object there are values such as latitude and longitude, but also other values such as city, country & continent. This information is generally "extracted" from your IP address, using something called internet geolocation.
Based on the location of the nodes and the information provided by the Cloudflare Workers platform, the worker will redirect you accordingly. However, there are scenarios where no geolocation information is available (for whatever reason). In those cases it will just pick NO-01 (Norway).
Here's the chronological list of how it decides where to redirect to. It will not continue down the list if one of the options matched.
Since we rely on geolocation based on IP addresses, there are a handful of issues that might occur.
If someone is routing all traffic via a VPN, then the IP address and geolocation will be based on the VPN server. If someone in Europe uses an Australian VPN server, they would in theory be redirect to the node in Australia.
In most practical cases this wouldn't make a difference, as the traffic has to go via the VPN server regardless (and not directly between user and the node). It would arguably be worse if the user was redirected to a European server because of this.
Sometimes IP addresses change ownership, or they are used in other areas (while the same ISP owns them). While it's not too common with consumer ISPs, it happens now and again, which can produce wrong results. Generally fixed within a few weeks though.
While all the servers are set up to support up to 1 Gbit/s (or better), they're mostly shared connections on virtual servers. Speeds may wary, in some cases it might be better to manually pick a different location. Overall though it shouldn't ever be a problem as the traffic to each node is low (for the time being).