[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt, mirror redirection systems and error reporting.



For the purposes of this post a "mirror redirection system" is a server (or group of servers) that receives connections over http chooses a mirror to send the user to (generally based on geolocation of the client IP) and then issues http redirect to point the client to the mirror.

I'm aware of two implementations in use for running mirror redirection systems for apt users. Raphael Geissert runs http.debian.net using his own code and I run mirrordirector.raspbian.org using mirrorbrain.

Both of the systems have some checks in place to try and avoid sending users to bad mirrors but given the multitude of ways in which a mirror can be creatively broken and given that the frequency of checking is limited inevitably sometimes a client will follow a redirect then hit an error from the mirror.

When this happens apt's current behaviour sucks. It reports the error with the original url it tried to retrieve and no indication that a redirect ever happened at all. This makes troubleshooting user complaints a PITA (difficult to tell the difference between "user forgot to run apt-get update" and "a mirror is broken" and difficult to determine which miror is broken in the latter case). It would be very useful to have better error reporting.

Mirrorbrain also lists a small selection of other mirrors (in addition to the mirror in the location: header) in the http response (don't remember the header name offhand but I can find out if anyone is interested). Apt could be extended to use such information to request files from alternative mirrors if the first one fails. Not sure how the developers would feel about that.


Reply to: