Author: Martino Giorgi
Academic Year: 2021/2022
Defense Date: 4 February 2022
Institution: UniversitĂ della Svizzera italiana
Faculty: Faculty of Informatics
Program: Bachelor of Science in Informatics

Author: Martino Giorgi
Academic Year: 2021/2022
Defense Date: 4 February 2022
Institution: UniversitĂ della Svizzera italiana
Faculty: Faculty of Informatics
Program: Bachelor of Science in Informatics
Scalability allows an application to properly react to dynamic traffic load. Scaling up allows to replicate computational components of the application to better handle the incoming requests from clients and to keep the service stable and responsive under heavy loads. On the contrary, when the traffic is low, the application scales down so that the computational resources are not wasted and costs are minimized.
This Bachelor Project aims to rearchitect an existing monolithic web service, called Stormed, into an indipendently deployable microservice, which can be scaled up and down to maintain high availability with reasonable costs. The reasons behind these requirements is that Stormed’s traffic load is typically minimal, but burst of requests may occur, which can lead to sudden spikes in the service usage.
The rearchitecting has been done using Akka framework and Kubernetes. The first has been used to rewrite the existing Stormed service to support a concurrent design with the actor model, while the second allows to distribute the working units on a remote cluster in a closed provider and scale them based on the incoming workload.
Following the rearchitecting of Stormed I’ve performed some workload experiments with the objective to understand the degree of scalability that the new design achieves. For this part of the project, a state-of-the-art tool called K6 has been used to perform several experiments and analyze the results. More specifically, an initial test with a unique request has shown that the new design is able to succesfully handle a reasonable amount of requests and that the autoscaling is working as expected. After this prior test, in order to evaluate the down scaling capability, a similar experiment with a double peak of requests has been performed. In between the two peaks of requests, the service has proved to be capable of scaling down the number of replicas so that no resources are wasted. A third and final test aimed to evaluate the previously achieved properties in a more realistic scenario. The double peak experiment has been replicated using random requests whose content is taken from a dump of StackOverflow. The results of this last trial finally showed that the new architecture is capable of reacting well to dynamic traffic load offering a high availability when required and minimizing the costs.


UniversitĂ della Svizzera italiana, Switzerland