Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

JCSCSVol 10 No 1 May 2017 Saman

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/317690568

Monitoring and Analysis of Microservices Performance

Article · May 2017

CITATIONS READS

3 1,248

1 author:

Saman A. Barakat
University of Duhok
3 PUBLICATIONS   3 CITATIONS   

SEE PROFILE

All content following this page was uploaded by Saman A. Barakat on 26 June 2018.

The user has requested enhancement of the downloaded file.


Journal of Computer Science and Control Systems 19
___________________________________________________________________________________________________________

Monitoring and Analysis of Microservices Performance


SAMAN Barakat

University of Duhok, Kurdistan Region, Iraq


Department of Computer Science, College of Science
42001 Duhok, University of Duhok, Iraq, E-Mail1: saman.barakat@uod.ac

Abstract – Monolithic applications have some


drawbacks and issues. In particular, when new
features are added to the monolithic applications the
code bases become bigger. With Microservices such
issues can be avoided. Microservices are software
architecture that consists of small, distributed services
that work together. It has many advantages such as
simplicity, independent service scalability, using
different technologies and simplicity in deployment,
but requires knowledge in distributed systems. In this
research, an existing microservice-based application
has been monitored and analyzed. The Kieker
framework has been used for monitoring the
application performance and the Kieker trace analysis
tools have been used to analyze the application.

Keywords: monitoring microservices; analysis Fig. 1. Microservices architecture.


microservices; microservices architecture.
Microservices have many good characteristics;
I. INTRODUCTION therefore, many companies have started to build their
large applications using this architecture.
Developers build different kind of applications based Newman [1] lists many advantages of microservices
on monolithic architecture. However, when new features architecture. These benefits can be summarized as
are added to monolithic applications, the code bases follows:
increase. This makes maintenance very difficult.
1. Easy to understand: Each service is responsible for
Developers cannot work independently on monolithic
only one task; therefore, it requires less code. This
applications, in which all team members have to
means that it is easy to understand and has less risk
coordinate all development and re-deployments efforts.
The development process becomes more complex over of changes.
time. Updating the application is difficult because 2. Easy to scale: With a large, monolithic application
updates require re-deploying the whole application. you have to scale everything together. While, with
Robert C. Martin’s definition of the single microservices only required services can be scaled.
responsibility principle states “Gather together those 3. Easy to deploy: With monolithic applications any
things that change for the same reason, and separate change in the code requires redeployment of the
those things that change for different reasons.” [1]. whole application. This could be a big problem for
Microservices take this approach to independent many organizations with its high degree of risk and
services. Microservices have gained much popularity in disruption. Deploying microservices is much
industry in the last few years. Microservices commu- simpler because the scope of a deployment is much
nicate with other distributed microservices, as illustrated smaller.
in Fig. 1. This architecture style has many benefits such 4. Ability to use a different technology: with
as smaller codebases for individual services, ability to microservices, the approach should be to use the
update and scale the services in isolation, enabling best tools and languages for the job, instead of one
services to be written in different languages if desired, size fit all.
utilizing varying middleware stacks and even data tiers. 5. System resilience: If a problem occurred in the
monolithic application, the application will stop
II. CHARACTERISTICS OF MICROSERVICES working, and then many functionalities may not
work, While, if one service of the microservices
The mcroservice architectural style intends to over- stops working, only a small, particular functionality
come scalability issues of monolithic applications [2]. will be lost.
20 Volume 10, Number 1, May 2017
___________________________________________________________________________________________________________

III. RELATED WORK They have focused on the architecture validation using
mathematical modeling.
Singh [3] has conducted a work on cluster-level
logging of containers with containers. He states that IV. PROBLEM STATEMENT
gathering and analyzing log information is an essential
factor of running production systems to ensure their Microservices architecture has been adapted by
reliability and to provide important auditing information. many companies to build large scalable applications.
Also, he mentioned that collecting the logs of Microservices applications consist of many small
components using containers and Kubernetes is very autonomous services. These services communicate with
challenging. Therefore, his research looks at how to each other in order to complete some tasks. Since
overcome these issues. services can fail at any time, detecting the service failure
Amaral et al [4] have done a study on evaluating is an important issue. Monitoring microservices can be a
microservices performance using containers. Containers key factor to detect service failure earlier. However, till
are used to deploy application either based on now very few studies have been done on monitoring and
monolithic architecture or microservices architecture. analysis of microservice performance. Therefore, this
Microservices architecture in containers can be achieved research has been conducted in order to understand how
by implementing one of two models master-slave or to monitor and analyze microservices performance. The
nested containers. The goal of the study was to compare research should be able to answer the following
the CPU and the network running benchmark in the two questions:
models of microservices architectures. 1. How can microservices applications be monitored?
Villamizar et al [5], conducted research on 2. How can microservices performance be analyzed?
evaluation of monolithic and microservices architectures
using cloud computing. In their study, the Play V. METHODOLOGY
framework has been used to develop an application
based on both, monolithic and microservices In order to achieve the aim of this project, an
architectures. This application was later deployed on a existing Microservice based application will be
cloud. The performance tests executed on both considered. Then, this application will be monitored
applications showed the benefits and challenges of using Kieker framework, as suggested by [2]. After the
implementing microservices applications. process of monitoring is done, logs are generated. These
Krylovskiy et al [6] have done a research on design a logs will be analyzed using Kieker's trace analysis tools.
Smart City IoT platform based on the Microservices
architecture. They suggest that this architecture provides VI. MICROSERVICES IMPLEMENTATION
significant advantages compared to Service-Oriented
Architecture for building. Microservices can be implemented using many tools
Alpers et al [7] have worked on a Microservice and languages, for instance with the Spring, Jolie or Play
based tool support for business process modeling. In this frameworks.
article, they have explained how Microservices can be
used to build modeling editors and additional services. A. JOLIE programming language
Also, they have discussed how Microservices can used Jolie is an open-source programming language used
to perform collaborative modelling techniques, increase to build microservices based applications. In the Jolie
reuse of utilized service components and improve their programming, each program is considered as a service
integration into lightweight user interfaces. that can communicate with other programs using a
Guo et al [8] have proposed a new Cloudware PaaS network for sending and receiving messages. Jolie
platform based on Microservice architecture and light supports an abstraction layer that allows services to
weighted container technology. This platform has the communicate using different methods such as TCP/IP
characteristics of scalability, auto-deployment, disaster sockets and local in-memory communications between
recovery and elastic configuration. processes.
Lacic et al.[9] have introduced a scalable
recommender framework. The framework is designed B. SPRING framework
based on the microservices architecture and exploits The Spring framework can be used to implement
search technology in order to provide real-time microservices applications. It is an application
recommendations. framework and inversion of control container for the
Le et al. [10] have introduced a new architecture Java platform. The framework's core features can be
solution for the Nevada Research Data Center based on used by any Java application, but there are extensions
the Microservices architecture. The main purpose of this for building web applications on top of the Java EE
solution is to provide scalability, reliability, platform.
maintainability to the data center.
Patanjali et al. [11] have introduced a design based C. PLAY framework
on Microservices architecture for developing a dynamic Play framework is an open source web application
rating, charging and billing for cloud service providers. framework, written in Scala and Java. This framework
Journal of Computer Science and Control Systems 21
___________________________________________________________________________________________________________

follows model–view–controller (mvc) architectural graphs. In this paper, a microservice application has
pattern. It aims to optimize developer productivity. This been analyzed and visualized using Kieker's trace
framework is used by (Mario et al) to implement and analysis tools.
evaluate Microservice based application [5].
For the purpose of this research, an existing X. RESULTS
microservice-based application has been used [12]. This
application has been monitored and analyzed using An existing microservice application, developed
Kieker analysis tools. The application consists of three using the Spring framework, has been monitored and
services which are Web-Service, Account-Service and analyzed as a starting. The research has used the Kieker
Registration-Service as can be seen in Fig. 2. framework for monitoring microservices performance
during run time and Kieker's trace analysis tools has
been used for analysis of the application.
As a result, the Fig. 3 shows the deployment
operation dependency graph with the operation
executing time in "Account-Service" and the Fig. 4
shows the deployment component dependency graph in
the "Account-Service".
In the deployment operation dependency graph as
can be seen in Fig. 3, it shows the performance of each
method in the microservice application. The graph
shows how many times each method has been visited. It
Fig. 2. Microservices-based application. shows the minimum, average, maximum and total
execution time in each method.
VII. KIEKER FRAMEWORK

Kieker is a framework developed in Java under the


Apache License Version 2.0 used for monitoring and
analyzing software performance [13], [14]. Kieker's
Architecture consists of two main components:
Kieker.Monitoring and Kieker.Analysis. The
Kieker.Monitoring component is responsible for
program instrumentation, data collection, and logging.
It uses measurement probes for the instrumentation of
software systems and writers to collect and store the
observed data. The other component is Kieker.Analysis,
which is used to read the monitored data and analyze
and visualize it. The SPEC research group has accepted
and published the Kieker framework as a recommended
tool for quantitative system evaluation and analysis as
part of SPEC research group's tool repository [15]. Fig. 3. Deployment operation dependency graph.

VIII. MONITORING In the deployment component dependency graph as


can be seen in Figure 4, shows the performance of each
The microservice application has been monitored component in the Microservices applications. It shows
using the Kieker framework. The monitored data is how many times each component has been visited. Also,
produced and saved in a folder. This folder contains two it shows the minimum, average, maximum and total
types of files which are a map file and monitored data. execution time in each component.
The map file shows what type of operations have been
used. The second file has several columns such as type
of operation, the method that has been invoked, start
time and end time.

IX. ANALYSIS

Kieker framework can be used to analyze the


software performance. Kieker has trace analysis tools, in
which it uses monitored logs to analyze and visualize the
application performance. The tool depends on two third-
parties programs which are GraphViz and
GNUPlotzunit. It produces several types of diagrams
such as sequence diagrams, call trees and dependency Fig. 4. Deployment component dependency graph
22 Volume 10, Number 1, May 2017
___________________________________________________________________________________________________________

XI. CONCLUSIONS AND FUTURE WORK monolithic and the microservice architecture pattern to
deploy web applications in the cloud,” in Computing
The aim of this ongoing research project is Colombian Conference (10CCC), 2015 10th, 2015, pp.
monitoring and analysis of microservices performance. 583–590.
[6] A. Krylovskiy, M. Jahn, and E. Patti, “Designing a Smart
There are many frameworks and tools that can be used
City Internet of Things Platform with Microservice
to implement applications based on microservices Architecture,” Proc. - 2015 Int. Conf. Futur. Internet
architecture for instance the Play and the Spring Things Cloud, FiCloud 2015 2015 Int. Conf. Open Big
frameworks. In order to achieve the aim of the project, Data, OBD 2015, pp. 25–30, 2015.
an existing microservice application, developed using [7] S. Alpers, C. Becker, A. Oberweis, and T. Schuster,
the Spring framework, has been monitored and “Microservice Based Tool Support for Business Process
analyzed. The research has used the Kieker framework Modelling,” 2015 IEEE 19th Int. Enterp. Distrib. Object
for monitoring microservices performance during run Comput. Work., pp. 71–78, 2015.
time and Kieker's trace analysis tools has been used for [8] D. Guo, W. Wang, G. Zeng, and Z. Wei, “Microservices
analysis of the application. Architecture Based Cloudware Deployment Platform for
Service Computing,” 2016 IEEE Symp. Serv. Syst. Eng.,
Future work aims at extending this analysis with
pp. 358–363, 2016.
ExplorViz which provides software landscape [9] E. Lacic, E. Lex, and D. Kowald, “ScaR : Towards a
visualization [16] and 3D application visualization [17]. Real-Time Recommender Framework Following the
Microservices-based applications are structured into Microservices Architecture,” no. October, 2015.
independently deployable, distributed self-contained [10] V. D. Le, M. M. Neff, R. V. Stewart, R. Kelley, E.
systems. Such architectures blur the boundaries of Fritzinger, S. M. Dascalu, and F. C. Harris, “Microservice-
landscapes and applications. The new (commercial) based architecture for the NRDC,” Proceeding - 2015
monitoring tool Instana for instance, is specifically IEEE Int. Conf. Ind. Informatics, INDIN 2015, pp. 1659–
designed for monitoring such microservices-based 1664, 2015.
[11] S. Patanjali, B. Truninger, P. Harsh, and T. M. Bohnert,
systems. Instana provides a 3D visualization on the
“CYCLOPS: A micro service based approach for dynamic
landscape level. It would be interesting to investigate rating, charging & billing for cloud,” Proc. 13th Int. Conf.
how 3D visualizations could be beneficial on ExplorViz' Telecommun. ConTEL 2015, 2015.
landscape level, in combination with the 3D [12] P. Chapman, “Microservices with Spring,” Spring blog.
visualization on the application level. 2016.
[13] A. van Hoorn, M. Rohr, W. Hasselbring, J. Waller, J.
ACKNOWLEDGEMENT Ehlers, S. Frey, and D. Kieselhorst, “Continuous
Monitoring of Software Services: {D}esign and
Thanks to Wilhelm Hasselbring for feedback on earlier Application of the {K}ieker Framework,” Nov. 2009.
versions of this paper. [14] A. van Hoorn, J. Waller, and W. Hasselbring, “Kieker:
{A} Framework for Application Performance Monitoring
REFERENCES and Dynamic Software Analysis,” in Proceedings of the
3rd ACM/SPEC International Conference on Performance
[1] S. Newman, Building Microservices. O’Reilly Media, Engineering (ICPE~2012), 2012, pp. 247–248.
Inc., 2015. [15] J. Waller, N. C. Ehmke, and W. Hasselbring, “Including
[2] W. Hasselbring, “Microservices for Scalability,” in performance benchmarks into continuous integration to
International Conference on Performance Engineering enable {DevOps},” ACM SIGSOFT Softw. Eng. Notes, vol.
(ICPE 2016), 2016, pp. 133–134. 40, no. 2, pp. 1–4, 2015.
[3] S. Singh, “Cluster-level Logging of Containers with [16] F. Fittkau, S. Roth, and W. Hasselbring, “{ExplorViz}:
Containers,” Queue, vol. 14, no. 3, pp. 30:83–30:106, May Visual Runtime Behavior Analysis of Enterprise
2016. Application Landscapes,” in 23rd European Conference
[4] M. Amaral, J. Polo, D. Carrera, I. Mohomed, M. Unuvar, on Information Systems (ECIS 2015 Completed Research
and M. Steinder, “Performance Evaluation of Papers), 2015, pp. 1–13.
Microservices Architectures using Containers,” in 14th [17] F. Fittkau, J. Waller, C. Wulf, and W. Hasselbring, “Live
IEEE International Symposium on Network Computing Trace Visualization for Comprehending Large Software
and Applications, 2015, pp. 27–34. Landscapes: The {ExplorViz} Approach,” in 1st IEEE
[5] M. Villamizar, O. Garcés, H. Castro, M. Verano, L. International Working Conference on Software
Salamanca, R. Casallas, and S. Gil, “Evaluating the Visualization (VISSOFT 2013), 2013, pp. 1–4.

View publication stats

You might also like