The old Raspberry Pi mirror system

Published: 02/01/2014

The original Raspberry Pi mirror system was quickly developed over 4 days in February 2012, after what could be described as a catastrophic failure, when we announced that the first operating system image was up for grabs. The server very quickly fell over, but the comment section was filled with mirror links from the people who managed to download the image. The community seemed willing to help us deal with the traffic, so after a bit of prototyping, I came up with my first ever piece of PHP code: download.php.

The PHP file contained a collection of mirrors, weighted by the speed of their connection. Each mirror also had a continent attached to it, which allowed for very rough geolocation. A mirror is randomly chosen based on the client's location, and has more chance of being chosen if it has a higher weight. The user is presented with a list of mirrors, and can pick from a number of links in case one of the mirrors was down. In the end, there were about 100 mirrors in the system (here is the original post asking for mirrors), until we eventually decommissioned the system on in November 2013.

By the time the system was decommissioned, there were a number of issues with it:

Mirrors were becoming full or being turned off without notice.

The deploy script was very unreliable and would often hang for hours if a mirror was full.

The lack of reliable mirrors in our control meant that a user would sometimes have to click multiple links before getting an image. This also meant that images couldn't be downloaded directly from a link, and a web browser had to be involved.

I was the only person who knew how to push images reliably, meaning that I had to be contacted every time an image needed updating.

I scheduled a meeting with Eben, Rob, and Gordon at Raspberry Pi towers to discuss these issues, and learned that they were planning on a system that eventually became NOOBS. NOOBS is a lightweight image that downloads an operating system of the user's choice from the internet and installs it on the fly. Having NOOBS work reliably would require an extremely reliable download infrastructure, where all of it was in our control...