Resources Case studies
Canonical scales up for Ubuntu release and new user services
When 20 million users all update their OS, that places a huge load on the servers. With Juju and MAAS, Canonical can meet that demand.
Around the launch of a new version of Ubuntu, Canonical faces huge levels of demand for its software archive and website. To enable it to rapidly scale its applications and hardware capacity, Canonical uses its own service orchestration tools, Juju and MAAS.
Ubuntu is the world's most popular free operating system, with 20 million people choosing it over commercial alternatives. A new version arrives twice a year, and users are prompted to update to get the latest features and improvements. Delivering those updates presents a huge technical challenge to Canonical, the company behind Ubuntu.
"The biggest challenge we face is serving the 20 million existing users, who will all be prompted to upgrade when the new release is available," said James Troup, Director of Information Services at Canonical. "When current Ubuntu users upgrade through the package manager, they request their own unique selection from the thousands of application packages that make up Ubuntu."
Canonical has strong support from a network of community mirrors, but provides the fallback hosting for countries without mirrors, and serves the UK and US - its largest markets - directly, using two data centres in London and one in Boston, MA.
Users can request updates and application installations at any time, and a new release typically attracts traffic between six and eight times higher than usual. Canonical needed to ensure it was ready for the huge demand it expected for the release of Ubuntu 13.04 in April 2013.
"If demand for upgrades exceeds our capacity, users will see errors and the upgrade process will fail," said Troup. "It's essential that we avoid that, but we can't afford to massively over-provision hardware just to cater for two huge spikes each year."
When European and US working hours overlap, demand is particularly high. Around the release of Ubuntu 12.10, website requests rocketed from about 100 per second to thousands per second. At peak times, Canonical aims to be able to satisfy 4,000 requests per second on the back end, which represents 40,000 per second at the front end once caching is taken into account.
The upgrade cycle isn't the only source of unpredictable demand for Canonical. As users move fluidly between the web and the desktop, and increasingly consume content on their devices, Canonical is integrating services in the operating system. One example is the Product Search in the Dash, which enables users to query multiple online store catalogues from within the operating system. To enable this feature, the request goes via Canonical's servers, but the demand on those servers is unpredictable and uneven.
Canonical needed a way to rapidly scale up its infrastructure to cope with spikes in demand, and scale back down again afterwards to avoid carrying the cost of underused resources.
To satisfy demand for updates (through archive.ubuntu. com), Canonical has servers in three data centres running Ubuntu Server 12.04 LTS (the most recent long-term support release). Each server uses solid-state drives (SSDs), and multiple bonded network cards to create a combined bandwidth of 4GB/second per server. To enable the flexibility and agility that Canonical requires, its architecture is managed as a bare metal cloud using Metal As A Service (MAAS) and Juju.