Viralscale: Leveraging Virality to Predict and React to Traffic Spikes

Master Thesis

Author: Lucas Pennati

Academic Year: 2019/2020

Defense Date: 23 January 2020

Institution: Università della Svizzera italiana

Faculty: Faculty of Informatics

Program: Master of Science in Software & Data Engineering

Abstract

Microservices are a novel architectural style that, among many benefits, enables easy to scale applications. This approach promotes the development of an application as a suite of the composing services. Due to this decoupling, it is easy to deploy multiple instances of the same service, and distribute the workload among them.

However, just as with monoliths, unexpected spikes in traffic can result in disruptive failures. Often these spikes are caused by a link to the service being posted on news aggregators (such as Reddit or Hacker News) or on social networks (Twitter, Facebook, etc.) that becomes extremely popular and generates an unusually high number of requests. In fact, the virality of these posts may cause traffic for which the system was never tested, and result in unexpected failures. Although mitigation techniques exist, such as scaling automatically when the system is struggling, they are not able to react in time as they tend to simply monitor the incoming traffic and the current status of the system, reacting instead of preventing.

In this thesis, we plan to leverage the virality of posts in news aggregators and social media to create a system, called ViralScale, based on a model that is able to predict, in a pre-emptive way, unusual and potentially problematic spikes of traffic. We monitor these social networks and news aggregators to predict which posts are becoming viral, and then scale up the services that are linked in the post through the analysis of the trend of the post.

We plan to evaluate our sytem by first determining a baseline by using a small server to serve content. We then plan to compare our approach to Kubernetes and its autoscaler. By simulating various amounts of traffic loads on these services, corresponding to typical spikes of traffic generated by viral posts, we plan to analyze multiple situations and understand whether ViralScale brings enough benefits to supersede current methods based on mere incoming traffic.