[tex-live] Choosing mirrors

Karl Berry karl at freefriends.org
Sat Jan 4 01:52:57 CET 2014

    how does tlmgr choose the closest mirror?

tlmgr doesn't actually choose, it just looks at the results of wgetting
http://mirror.ctan.org (see sub give_ctan_mirror in TLUtils.pm).  Thus
the redirection target host is chosen in the web server that hosts
mirror.ctan.org.  The function that ultimately does it is auto_redirect
in the Apache2::Geo::Mirror module, which I'm sure you can find if you
actually want to.

>From a quick look, it looks to me like it chooses a mirror from the same
country as the originating IP if possible, or one at random if not.  And
yes, we know perfectly well that this is far from ideal, but Internet
topology information is not available at that, and this has proved to be
much better than pure random selection.

BTW, we go to some lengths at several levels to filter out non-working
or stale mirrors, etc.

    and choose 'load default repository'
    whereas choosing 'load default net repository'

I don't know the difference off the top of my head, and can't
investigate the code right now.  I wildly guess that "load default"
would go to the mirror previously explicitly chosen by the user (if
there is one), while "load default net" always goes to mirror.ctan.org.

I agree the names are confusing, and if they both map to the same thing,
seems like only one should be displayed.  Or something.  I'm sure
Norbert will be back online eventually and can think about it ...


More information about the tex-live mailing list