













































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The effect of vertical scaling on the performance of containerized applications using Docker and Kubernetes. The study includes a literature review on related topics, such as ElasticDocker and container autoscaling systems. The research focuses on identifying the performance metrics most affected by vertical scaling and characterizing the negative impact. The document also proposes potential solutions for managing container resources and scaling in response to varying load demands.
What you will learn
Typology: Exercises
1 / 53
This page cannot be seen from the preview
Don't miss anything!
Master of Science in Telecommunication Systems June 2019
Faculty of Computing, Blekinge Institute of Technology, 371 79 Karlskrona, Sweden
This thesis is submitted to the Faculty of Computing at Blekinge Institute of Technology in partial fulfilment of the requirements for the degree of Master of Science in Telecommunication Systems. The thesis is equivalent to 20 weeks of full time studies.
The authors declare that they are the sole authors of this thesis and that they have not used any sources other than those listed in the bibliography and identified as references. They further declare that they have not submitted this thesis at any other institution to obtain a degree.
Contact Information: Author(s): Dhananjay Midigudla E-mail: dhmi@student.bth.se
University advisor: Emiliano Casalicchio Department of Department of Computer Science and Engineering
Faculty of Computing Internet : www.bth.se Blekinge Institute of Technology Phone : +46 455 38 50 00 SE–371 79 Karlskrona, Sweden Fax : +46 455 38 50 57
I would like to express my sincere gratitude to Prof. Emiliano Casalicchio for his valuable inputs and support throughout the thesis. I would like to thank professor Patrik Arlos, whose curriculum gave me a unique educational perspective.
I would like to thank my parents for their unconditional love and support.
ii
AWS Amazon Web Service
CPU Central Processing Unit
EC2 Elastic Compute Cloud
HTTP Hyper Text Transfer Protocol
TCP Transmission Control Protocol
iii
Infrastructure as a Service (IaaS)[6], is a cloud computing infrastructure, which pro- vides virtual machines to users on demand. Over the years, this platform has seen significant improvements in provisioning of customized virtual machines where users can choose the operating system and dependencies according to their needs. Small scale application could be managed efficiently on the virtual machines but it be- came more complex and difficult to manage large scale applications when there was dynamic load present.
Container technology is gaining popularity in cloud industry for research and commercial offerings. The ease in deploying, scaling and exposing an application to the internet are a few contributing factors to container’s widespread usage. Large scale applications are being deployed in a microservice architecture to distribute and isolate sub-processes in order to improve the overall performance. Hence, orchestrat- ing the containers and redefining their behaviour when required is very important when there are varying load demands for the hosted application.
Scalability[7] in cloud computing is a feature that defines the ability to increase or decrease compute resources or instances(virtual machines or containers), in order to meet workload demands and ensure that there is no degradation in the performance of the application. Scaling is popularly used in a microservice architecture, where different segments of the application are containerized and based on the workload demand, specific containers can be scaled to ensure consistent performance, high resource utilization.
Kubernetes[8], is one such popular container orchestrating tool, that is gaining popularity. In cloud computing terminology, kubernetes is viewed as platform as a service (PaaS). Kubernetes provides platform to manage containers and services and its popularity can be linked to its robustness in configuration and automation of containers and services.
This chapter provides a brief description of the technologies used in this thesis. Containers, Docker container, Kubernetes architecture, AWS EC2, Apache Jmeter are the technologies described.
A container refers to a virtualization technology, which is a package of the applica- tion’s code and its dependencies. A container can therefore be called as a unit of software that is flexible, independent and runs less overhead. The host operating system will share the same kernel with containers. The applications running inside the container are independent of the running environment. This ensures that the ap- plication’s performance is consistent regardless of the environment. Containers are operating system level virtualization and are similar to virtual machines. Containers support an entire operating system or a single application [1]. Containers have em- powered the usage of micro-service architectures by being light weight, providing fast start-up times because it does not emulate the physical hardware as a virtual ma- chine does. Containers develop applications based on monolithic and micro-services architectures. The core of containers relies on Linux namespaces and cgroups. One can run a single application within a container whose namespaces are isolated from other processes. Currently Docker containers are widely used containers.
Figure 2.1: Containers vs Virtual Machine [1]
Chapter 2. Background 4
Docker [9]is an open source project which provides a platform for users to create con- tainers. In Docker, containers are initially images, which are automatically converted into containers at run-time. Standardization, security, compatibility across multiple platforms makes it quite popular for businesses and research purposes. Docker pro- vides two features to the user namely Docker client and Docker hub. Docker client allows users to download or create new images for the required applications. These images can be pushed to docker hub, and can be accessed anytime.
Kubernetes [8]is an open-source platform designed to automate deploying, scaling, and operating application containers. With kubernetes, one can deploy applications quickly; scale and limit hardware usage to required resources only. It is portable, extensible and self-healing. In kubernetes, containers are isolated from each other and they have their own file systems. Their computational usage can be bounded. Kubernetes can schedule and run application containers on clusters of physical virtual machines. A kubernetes cluster consists of master and nodes. Master is responsible for managing the cluster. It coordinates all activities in the cluster. Node is a virtual machine or a computer that serves as a worker machine in a kubernetes cluster. A node should have tools for handling container operations.
Figure 2.2: Kubernetes Architecture [2]
As mentioned above, a node [3]in kubernetes can be a virtual machine or a physical machine which contains all the necessary resources to run a pod. The nodes in kuber-
Chapter 2. Background 6
Vertical scaling[14] is the addition or deletion of real computing resources such as CPU, memory to a container. Vertical scaling is done when the workload of a con- tainer increases, and it is applicable to any application. The extent of vertical scaling is limited to the hosting system’s capability. When multiple containers are running on a single machine, the resources (CPU and memory) are allocated by 2 schedulers namely: 1) Completely fair scheduler (CFS), 2) Real-time scheduler (RTS). A CFS equally distributes the CPU time to the containers where as an RTS provides specific limits to the Docker containers.
Amazon Elastic Compute Cloud (EC2) [15] [8], is a web service provided by AWS, which provides users with a re-sizable compute capacity in the cloud i.e users can choose configurations of their virtual machines and deploy them quickly. It also has preconfigured templates called Amazon Machine Images (AMI), that packages the operating system and additional dependencies on the server.
Figure 2.4: EC2 architecture [4]
A virtual private cloud (VPC) [5]provides users with a virtual network which can run resources like EC2 etc. The vpc can be modified by the user accordingly such as specifying the ip range, security rules etc. There are 2 types of available vpc’s namely:
Chapter 2. Background 7
Figure 2.5: Virtual Private Cloud - Default [5]
Figure 2.6: Virtual Private Cloud - Custom [5]
This section describes the related previous works that provided motivation for this research work. Peng Wang et al. [19] analyzed the performance of docker container on kubernetes platform. Docker architecture, cgroups, linux namespaces were studied and CPU, disk i/o performance metrics were analyzed. Yahya Al-Dhuraibi et al. [14] proposed ELASTICDOCKER, which adds or re- moves compute resources to docker containers based on the workload demands au- tonomously. The proposed model migrates docker container to another host if the workload demands more resources of the host than available and the migration tech- nique used is based on CRIU functionality in linux systems. End user QoE, resource utilization, migration time were the performance metrics that were considered. The performance of ELASTICDOCKER was measured under different workload scenar- ios and was compared with kubernetes auto-scaling feature and it was concluded that ELASTICDOCKER outperformed kubernetes autoscaling by 37 %. In [20], the authors designed an autoscaling system for web applications hosted on docker, that dynamically scales up or scales down the number of containers according to workload demand. A scaling algorithm was developed that spawns new containers and attaches them to the load balancer. An underlying predictive model in the algorithm ensures to scale down the number of containers only if it predicts less number of containers for k successive periods. Chuanqi Kan [21] designed DoCloud, an elastic cloud platform that dynamically scales up or scales down the number of containers according to the workload demand. Scaling down the number of containers was done keeping in mind that there might be an upsurge in demand just after scaling down. In [22], authors proposed a framework involving a custom container auto-scaler that scales in or scales out containers based on the resource utilization of the running containers. The auto-scaler performed better when the workload was repetitive, and performed very poorly when there was random workload. In [23], the authors classified autoscaling into predictive and reactive systems. Predictive systems employ machine learning, reinforcement learning to predict the future workload and allocate resources accordingly.
A systematic approach was employed in carrying out the research methodology for this thesis. It involved an extensive study to figure out a vertical scaling solution, implementation of the solution under different scenarios, data collection and analy- sis. Vertical scaling was done manually based on the workload demand. Literature study on containers, Docker containers, Kubernetes, elasticity of containers was done initially which provided insight on the architectures, tools and other technologies re- quired to perform the experiments. Since Kubernetes is orchestrating the docker container running our web service, an investigation on how to perform vertical scal- ing in kubernetes was done. In kubernetes, containers are generally deployed in pods. A deployment specifi- cation can be configured that inputs the desired characteristics and runs the pods accordingly. As mentioned in section 2.3.2, containers run inside pods and all the instructions and specifications to a pod are redirected to the containers inside it. Deployments allows users to manage more than one container, add shared volumes among them, and bind them together to host a service. Once the deployment is set up, a network load balancer is required so that our application is exposed to the internet as a service. A service can be defined in kubernetes linking our deployment to a newly created load balancer which makes it possible to access the service through the ingress of the load balancer. Load is generated progressively for a time period and this traffic is redirected to the pod by the load balancer gradually. Kubernetes architecture and its features were studied extensively to determine the methods that can be used to perform vertical scaling. One such feature that that was of interest was "Rolling update[24]" , which is a kubernetes feature that can be used to update an existing deployment. The rolling update feature uses a deployment controller [25] that manages updates to the existing deployments. Rolling update can be used to modify a deployment in many ways such as increasing or decreasing the number of container replicas, changing container images etc. But the main advantage that rolling update provides is that it does not break down the deployment if an invalid update (such as invalid container images, unavailable resources etc.) is requested by the user. The user can monitor the status of the deployment update requested and can take necessary actions if required. Rolling update also offers a roll back option, that brings the deployment back to the previous configuration and cancels the update. The thesis work therefore has been divided into the following steps: