The Swiss agency Jung von Matt are a Divio Partner and rely heavily on the Divio Cloud infrastructure. For a recent project, they were able to take advantage of its benefits for rapid Django development and responsive scaling under load. 

Jung von Matt were commissioned to create Tippspiel. The Euro 2016 competition began on 10th June, and wasn't going to wait for the site to be ready, so having a development and deployment platform to rely on was key to launching on time. 

As a project to run alongside a significant internation sporting event, Tippspiel presented a number of challenges. At various points during the month of the competition - the times of the actual football matches - load on the site could be expected to soar suddenly. From a baseline of around three requests a minute, at peak times the site saw as many as 180 requests per second.

Requests served per second. Each cluster of peaks corresponds to three different Euro 2016 games.

RAM usage for the whole application during the same timeframe of the previous chart. The memory consumption varies with the number of processed requests, as the scaling algorithms automatically starts and stops instances on the fly in order to accomodate them.

To make this even more complex, it was not possible to predict in advance what this load would be, and the site had to be able to bear this from the start. There would be little opportunity to consider different strategies after discovering problems in the first real test.

Developed in Python and Django with a Celery-based task distribution system, Tippspiel made use of the standard Divio Cloud hosting provision. Because we were aware that the site would face unknown and potentially very high loads, we were able to ensure that it would scale to meet whatever demands were made of it.

The demands came soon enough. The Divio Cloud infrastructure automatically scaled to meet them. From 3 application instances with 512MB each, it rose to 6 instances and a total of 16GB. The new servers were made available in moments. A more responsive database was provisioned, that itself could offer live, automated scaling.

We monitored the site closely in case we needed to step in, but for the most part Divio Cloud responded automatically (one thing we did manually was fine-tune some uWSGI parameters). We also worked with Jung von Matt to help optimise their Django applications, the queue system, caching and other aspects of the project.

 

Requests per second during some of the last Euro 2016 games. At this point we had successfully collaborated with JVM to optimize key parts of their system and make better usage of the available resources.

RAM consumption for the whole application. By bringing in our expertise in scaling up Django-based web applications, we were able to make the application less resource-intensive and its resource usage more predictable. The first peak in the previous chart marked the highest request rate during the whole Euro 2016 games, however this is not reflected anymore in memory consumption.

95th percentile response time across all served requests. As visible in the chart, the response time constantly remained in the 100/200ms range, even when the application was under heavy load.

Throughout the lifetime of the project, Tippspiel didn't just handle the load, but handled it well. Request times remained low and steady. 

Served more than 15M pageviews;
Up to 180 requests/second
95th percentile response time below 200ms
More than 60 live deployments over less than 40 days

 

 

Get to know us with personal tour

We know each organisations needs are unique and integration with your existing systems and infrastructure is important. Book a time that suits you and we can answer any questions.