Supporting Microservice Evolution
Supporting Microservice Evolution
Abstract—Microservices have become a popular pattern for de- and analyzing such information in the context of an evolving
ploying scale-out application logic and are used at companies like system relies on non-trivial knowledge and effort.
Netflix, IBM, and Google. An advantage of using microservices
In collaboration with our industrial partner, IBM, we iden-
is their loose coupling, which leads to agile and rapid evolution,
and continuous re-deployment. However, developers are tasked tified several evolution-related maintenance tasks that are
with managing this evolution and largely do so manually by challenging for microservice developers. Supporting these and
continuously collecting and evaluating low-level service behaviors. similar tasks is the focus of our work.
This is tedious, error-prone, and slow. We argue for an approach Next, we overview the tasks and briefly outline the chal-
based on service evolution modeling in which we combine static
and dynamic information to generate an accurate representation lenges they entail.
of the evolving microservice-based system. We discuss how • Checking for upgrade consistency. Microservices are
our approach can help engineers manage service upgrades, developed and evolve independently, yet the μApp must
architectural evolution, and changing deployment trade-offs.
remain coherent and functional. Determining compatibil-
ity and consistency between microservice versions is a
I. I NTRODUCTION continuous challenge for developers. Today, developers
Cloud platforms offer pay-as-you-go resource elasticity and manually identify microservice dependencies and either
virtually unbounded resources. However, to take advantage engage with other developers who own that microservice
of these features, developers must judiciously distribute busi- or evaluate the dependency through code inspection.
ness logic on the platforms. Microservices [1] are a popular • Identifying architectural improvements. An evolving
pattern for distributing functionality. A Microservice-Based μApp will experience software architectural corrosion,
Application (μApp) is a distributed system that consists of such as a decrease in cohesion and increase in coupling
small, loosely coupled, mono-functional services (microser- between related services. Today detecting such architec-
vices) that communicate using REST-like interfaces over a tural problems and evolving microservice architectures
network. Microservices are typically developed and deployed are manual and highly involved processes that require
independently, resulting in polyglot μApps that rapidly evolve global knowledge of microservice inter-dependencies.
and are continuously re-deployed. • Evaluating changing deployment trade-offs. Microser-
Understanding a single microservice may be straightfor- vices offer extensive deployment flexibility. For example,
ward, but μApps often contain dozens of inter-dependent mi- two services can be co-located as two containers on the
croservices that continuously change. Monitoring and logging same machine, as two containers in one VM, or as two
stacks for microservices, such as the Elk stack1 , are essential VMs on the same machine. A poor deployment choice
to understanding the microservices in a μApp and are broadly can increase cost, and hurt performance, scalability, and
adopted. Unfortunately, logs produced by such stacks contain fault tolerance. Furthermore, these decisions must be re-
low-level information for a single deployment. Reconciling the evaluated as the μApp evolves. Today developers evaluate
view of the deployed version of the system with the historical changing deployment trade-offs through trial and error
view of changes being introduced requires interpretation by without a systematic strategy nor much tool support.
the developer. In this paper, we propose an approach for combining struc-
For example, a log may record a failing REST invocation tural, deployment, and runtime information about evolving mi-
against a particular URL, but it is up to the developer to croservices in one coherent space, which we refer to as service
determine if this invocation was introduced in a recent change evolution model. By aggregating and analyzing information in
and requires fixing or if it indicates an undesirable dependency the model, we aim to provide actionable insights, assisting
that should rather be eliminated. Furthermore, non-trivial tasks μApp developers with maintenance and evolution tasks.
require piecing together logged information from multiple In Section III, we introduce the proposed model. We also
sources, such as multiple system logs, container infrastructure describe a preliminary design of a system for populating the
data, real-time communication messages, and more; collecting model by collecting information from a variety of sources,
both static and dynamic. In Section IV, we discuss how the
1 https://logz.io/learn/complete-guide-elk-stack/ information captured in the model helps developers address
540
Authorized licensed use limited to: POLITECHNIKI WARSZAWSKIEJ. Downloaded on December 05,2023 at 13:09:32 UTC from IEEE Xplore. Restrictions apply.
\login\<username>
EastCoast WestCoast
Frontend Application
\list-todos v1 ToDo
\login\<username> Processing Database
\create-todo\<todo> Frontend
v2
\list-todos ApplicationVersion Provider ApplicationVersion
version 1 IBM Bluemix version 2
Fig. 3. Two versions of Frontend, differing in their supported operations.
541
Authorized licensed use limited to: POLITECHNIKI WARSZAWSKIEJ. Downloaded on December 05,2023 at 13:09:32 UTC from IEEE Xplore. Restrictions apply.
Host
Retrospective Prospective Containers
Analysis Analysis \login\<username>
Future Frontend
\list-todos
Init
Model
… Prev
Model
Curr.
Model
Model 1
\todo\<username> Todo
Future
Now Model2 \users\<username>
Time
… \users
User
Database
\todos
Fig. 5. Retrospective and prospective model analysis.
Fig. 6. Refactored ToDo application architecture
542
Authorized licensed use limited to: POLITECHNIKI WARSZAWSKIEJ. Downloaded on December 05,2023 at 13:09:32 UTC from IEEE Xplore. Restrictions apply.
Prospective Analysis. Furthermore, we can use our model as developers in evolving microservices and the μApps they
a “sandbox” for exploring the space of possible architectural comprise. In this paper, we proposed a vision for combining
and deployment refactorings. We would instantiate several structural, deployment, and runtime information about an
possible refactorings as new snapshots of the model (Future μApp to help with evolution-related tasks. Our approach relies
Models in Fig. 5) and evaluate their ability to handle the on distributed tracing, log analysis, and program analysis
collected real-life μApp scenarios. That is, we will assess techniques and we plan to fully realize and evaluate it in our
potential improvement suggestions by replaying the traces future work.
corresponding to the scenarios from the current model in the
ACKNOWLEDGMENTS
new model. If the new model withstands a battery of tests, we
will issue a recommendation for the change/refactoring to the This works is supported by IBM Canada, CAS program and
developers responsible for the relevant microservices. by CAPES Brazil, grant 88881.132774/2016-01.
543
Authorized licensed use limited to: POLITECHNIKI WARSZAWSKIEJ. Downloaded on December 05,2023 at 13:09:32 UTC from IEEE Xplore. Restrictions apply.