Container Orchestration and Performance Optimization for a Microservicesbased Application

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Microservices is a new software design concept for developing scalable, loosely coupled services with a smaller codebase than the traditional monolithic approach. The designed microservices can communicate using several protocols, such as Advanced Message Queuing Protocol (AMQP) or HTTP/REST. Software developed using microservices design offers the developers great flexibility to choose a preferred technology stack and make independent data storage decisions. On the other hand, containerization is a mechanism that packages together the application code and dependencies to run on any platform uniformly and consistently. Our work utilizes Docker and Kubernetes to manage a containerized application. The Docker platform bundles the application dependencies and runs them in the containers. Moreover, Kubernetes is used for deploying, scaling, and managing containerized applications. On the other hand, microservices-based architecture brings many challenges as multiple services are being built and deployed simultaneously in this design. Similarly, a software developer faces many questions such as where to physically deploy the newly developed service? For example, place the service on a machine with more computing resources or near another service which it often needs to communicate with? Furthermore, it is observed in previous studies that the microservices may bring performance degradation due to increased network calls between the services. To answer these questions, we develop a unique microservices-based containerized application that classifies images using deep learning tools. The application is deployed into the Docker containers, while Kubernetes manages and executes the application on the on-premise machines. In addition, we design experiments to study the impact of container placement on the application performance in terms of latency and throughput. Our experiments reveal that Communication Aware Worst Fit Decreasing (CAWFD) obtained 49%, 55%, and 54% better average latency in microservice placement scenario two. This average latency is lower than CAWFD in scenario one in the 100, 300, 500 images group. Simultaneously, the Spread strategy displayed minimal performance because the Kubernetes scheduler determines the container placements on the nodes. Finally, we discover that CAWFD is the best placement strategy to reduce the average latency and enhance throughput. 

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)