leanIX Whitepaper Microservices EN-6
leanIX Whitepaper Microservices EN-6
leanIX Whitepaper Microservices EN-6
Microservices—What an
Enterprise Architect needs to know
Contents INTRODUCTION
Rapidly accelerating digitalization is forcing many businesses to rethink their
Introduction
architectures. To meet the constantly growing expectations of technology-
A brief history savvy customers, companies must ensure that their products are available on
of microservices all digital channels and as quickly as possible.
Microservices One way to reduce throughput times in order to adapt to the ever-changing
and other trends needs of highly dynamic markets is to introduce a microservices architecture
in software development. Microservices allow rapid changes and short release
Transforming to a times along with high scalability and autonomous teams.
microservices architecture
One major use of microservices is to break down or avoid monoliths in order
Summary to avert the disadvantage that changes made to any part of the application
require the entire monolith to be rebuilt and redeployed. Over time, monoliths
develop very complex structures that make it increasingly difficult to perform
changes quickly. Moreover, scaling cannot be limited to individual parts, but
must be applied to the entire application.
A BRIEF HISTORY OF
MICROSERVICES
How it all began
The term "micro web services" was first used by Dr.
Peter Rogers during a conference on cloud computing
in 2005. "Microservices" themselves premiered at
an event for software architects in 2011, where the
term was used to describe a style of architecture that
many attendees were experimenting with at the time.1
Netflix and Amazon were among the early pioneers
of microservices. The popularity of microservices
has recently been on the rise because they can solve
many current IT challenges such as increasing speed,
scalability of applications and rapid test processes.
Features of microservices
Services within a system are largely decoupled and can therefore be easily built,
Decoupling
altered and scaled.
Business capabilities Microservices are very simple and focus on a single business capability.
Many developers and teams can work independently of each other and thus
Autonomy
significantly increase speed.
The focus is on using the right tool for the job, not on standardizing technology
Decentralized governance platforms. Teams prefer to develop useful tools that other developers can use to
solve similar problems.2
Microservices support agile development. A new feature the customer does not
Agility yet quite believe will be successful cannot only be quickly developed—it can also
be quickly discarded again.3
Figure 2: Features of microservices
1, 2
Fowler, Martin: Microservices, a definition of this new architectural term. http://www.martinfowler.com/articles/microservices.html (11/02/2016)
3
Steinacker, Guido: Von Monolithen und Microservices. https://www.informatik-aktuell.de/entwicklung/methoden/von-monolithen-und-microservices.html
(11/02/2016)
Page 2 of 8
The philosophy behind microservices
The microservices style of architecture develops architecture is difficult to upgrade or maintenance
complex application software from small, individual becomes too complex. Microservices can be the answer
applications that communicate with each other using to this problem, as they break down complex tasks
language-independent interfaces (APIs). Companies into smaller processes that work independently of
run into trouble if they are unable to scale monolithic each other.
architecture that has developed over time, if their
... and scales by replicating the monolith ... and scales by distributing these services
on multiple servers. across servers and replicating them as
needed.
Microservices architecture
To create a sample microservices architecture we API services —Open up a functionality externally to
first have to decide how we want to structure our e.g. allow third parties to develop creative applications
microservices. For example, we could divide them that utilize the underlying functionality in the system
vertically into levels: landscape.
Central services—Handle business data persistence and Horizontally we would in this example apply a
apply business rules and other logic. structure based on domains in the sense of business
functionalities.
Composite services—Organize either a number of
central services in order to fulfill a common task, or It is extremely important to define a target architecture
aggregate information from several central services. before beginning to scale microservices, otherwise
the IT landscape may end up devolving into chaos and
exhibit worse properties than the existing monolithic
applications.
Page 3 of 8
C-1 C-2 C-1 C-2
API Services
Composite Services
MS-5 MS-6
Core Services
4
Mauro, Tony: Adopting Microservices at Netflix: Lessons for Team and Process Design. Page 4 of 8
Enterprise Architecture Management
& microservices
DevOps and microservices are core components of As a result, LeanIX can offer all employees up-to-date
a new form of IT. But there is another factor that is access to information on the IT landscape in their
necessary in order to support successful IT for the digital personal context—a basic requirement if a microservices
age: Enterprise Architecture Management (EAM). EAM architecture is to work. In day-to-day work and when
however also needs to evolve: Traditional approaches onboarding new employees, the increased transparency
based on complicated IT landscape modeling and can contribute significantly to sustainable, rapid further
planning for years in advance are no longer suitable for development of a company's IT landscape.
our extremely fast-moving digital times. In the worst
case scenario, EAM may even create a bottleneck and
block new developments.5 TRANSFORMATION TO A
MICROSERVICES ARCHITECTURE
In a microservices organization however, state-of-the-
Although it is not always easy for companies to
art EAM can create more added value than ever. Even
introduce microservices, there are very good reasons
independently working teams have to keep working
to do so. Allan Naim, Product Manager Container
towards a common goal, and the software they produce
Engine and Kubernetes at Google, predicts that in a
has to be able to work together. Online clothing
not-too-distant future every organization, no matter
retailer Zalando for example uses a team of enterprise
the industry or sector, will become a software company.
architects for this purpose.6 This team serves as the link
The reason for this is that customer data is becoming
between the various teams and programming languages
just as valuable as products and services.
and is responsible for filling the gaps that arise from
the different processes. It always has to know what is
Companies that want to survive in the digital world
happening where, says Eric Bowman, Vice President of
have to be aware that innovation, agility and speed
Engineering at Zalando.6
are the most important factors. Decoupling from
legacy systems by introducing microservices offers the
The developers at Zalando work in over 100 small, agile
opportunity to experiment with new approaches and
teams. Described as "radical agility", this model was
iterate more quickly.
introduced in early 2015 to make the ever-growing
tech company more efficient and more innovative.6 In a
Microservices not only change the way companies
microservices architecture with 200 microservices, the
write code, but also the companies themselves. While
teams are almost entirely autonomous and can choose
in a monolithic system the roles of team members are
the most suitable technology for each case themselves.
specialized, under microservices employees can work
Developers have full responsibility from DevOps
freely on different parts of the application without
through quality assurance to deployment.7
interruption. Introducing microservices can also change
business processes, products and customer services.
Many companies use an EAM tool to maintain an
And because microservices also give individuals more
overview of their IT landscape. Tools such as LeanIX
freedom to make decisions, they encourage innovation.
form the link between the individual teams and
technologies and provide a view of the overall system.
5
Friedrichsen, Uwe: The Need for Speed – eine Geschichte über DevOps, Microservices, Continuous Delivery und Cloud Computing.
https://blog.codecentric.de/2015/08/the-need-for-speed-eine-geschichte-ueber-devops-microservices-continuous-delivery-und-cloud-computing (11/02/2016)
6
t3n: Zalando: Wie der Mode-Konzern seine Tech-Bewerberzahlen vervierfachte. http://t3n.de/news/zalando-mode-konzern-739646/ (10/04/2016) Page 5 of 8
7
Giamas, Alex: From Monolith to Microservices, Zalando’s Journey. https://www.infoq.com/news/2016/02/Monolith-Microservices-Zalando (11/08/2016)
Best practices for introducing
microservices
No legacy system can be transformed into microservices A separate data store for each microservice
overnight. As Phil Calçado of SoundCloud describes in Do not use the same data store for all your microservices.
his article on the company's transition to microservices, Each microservices team should select the database
there is still live monolith code at SoundCloud even that is best suited to its service. A single data store also
after several years. But the importance of this monolith holds a significant risk that microservices from different
is decreasing every day.8 teams share the same database structures, perhaps to
avoid duplicating work. When one team updates its
Companies that want to introduce microservices have database structure, other services that use the same
to decide where and how these microservices can be structure may also have to be adapted.
integrated into their existing applications. The first
step is to define a microservices architecture. It has to Code should have a similar level of maturity
be established how the services will interact with each All code in a microservice should have a similar degree
other before a company attempts to optimize their of maturity and stability. If you have to add or rewrite
implementation. E-commerce company Zalando for code that works well in a microservice, the best way
example uses the STUPS platform, which gives every is usually to create a new microservice for the new or
autonomous team a set of tools and components in altered code and leave the existing microservice where
the form of a convenient and tamper-proof platform- it is. This allows you to iteratively release and test the
as-a-service on Amazon Web Services (AWS)9. STUPS new code until it is error-free and maximally efficient.
allows Zalando to iterate very quickly and at the same
time meet its high reporting requirements. Once your Deployment in containers
microservices architecture gets going, you have to be Deploying microservices in containers is important, as
able to optimize the increase in speed. it means you only need one tool to deliver everything.
As long as the microservice is in a container, the tool
Microservices evangelist Adrian Cockcroft, who was knows how to deliver it. Docker has currently become
responsible for introducing microservices at Netflix, the standard for containers.
has introduced a number of best practices for designing
and implementing microservices10. Treat servers as stateless
Treat servers as replaceable members of a group. They
Business capability based design all have the same functionality, so you do not have to
Microservices architecture typically needs teams worry about individual servers. Cockcroft says that you
that specialize in particular business capabilities should think of servers as "livestock", not as pets. If you
with different requirements, such as order approval, have a machine that has special functionalities, that you
shipping, delivery and returns management, which are know by name and where everyone is upset when it
all part of order fulfillment. Companies should aim to fails, it's a pet. Instead you should think of your servers
focus not on more projects, but on products. Services like a herd of cows. What matters to you is how much
should be developed as independent products that are milk you get. If one day you find yourself with less milk,
well documented and each only responsible for a single you determine which cows are no longer producing
business capability. enough milk and replace them.
8
Calçado, Phil: How we ended up with microservices. http://philcalcado.com/2015/09/08/how_we_ended_up_with_microservices.html (10/28/2016)
9
Zalando STUPS. https://stups.io/ (10/25/2016)
10
Mauro, Tony: Adopting Microservices at Netflix: Lessons for Architectural Design.
https://www.nginx.com/blog/microservices-at-netflix-architectural-best-practices/ (11/02/2016) Page 6 of 8
Monitoring SUMMARY
Microservices consist of a large number of mobile parts;
it is therefore all the more important that you measure Even if you choose not to introduce a pure microservices
everything efficiently and simply with mechanisms architecture, and instead only apply some of its
such as response time notifications, service error principles, you can still benefit significantly—especially
notifications and dashboards. Use logs such as Splunk in a traditional corporate IT landscape. Less redundant
and monitoring tools like AppDynamics. code and data means lower risk, as fewer errors can
occur and your teams are better able to concentrate on
the main functions of their applications. Microservices
allow greater flexibility in deployment, release schedules
and processes, and enable you to pick up far more
speed in order to meet the needs of your customers
and the challenges of digitalization. The responsibility
for business capabilities gives your applications focus,
as they are developed as independent products that
deliver a single business capability, well documented
and easy to use.
Copyright
© LeanIX GmbH. All rights reserved. LeanIX and the LeanIX logo are trademarks or registered trademarks of
LeanIX GmbH in Germany and/or other countries. All other products or services are trademarks of their respective
companies.
This document is current at the time of its initial publication. LeanIX GmbH reserves the right to alter it at any time.
THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED AS IS, WITH NO WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLICIT.
Page 7 of 8
About LeanIX
LeanIX offers a Software-as-a-Service (SaaS) for Enterprise Architecture (EA), which enables organizations to take
faster, data-driven decisions for their IT landscape. More than 80 leading brands such as adidas, DHL, Merck,
Vodafone, and Zalando use the innovative solution worldwide. Users of LeanIX gain insights on how to organize and
leverage their IT landscape to increase competitiveness and enable innovation going forward. LeanIX addresses
the frequent problem that the required information about the IT landscape is missing, outdated, or difficult to
analyze. Use cases include application rationalization, technology risk management, and the shift from monolithic
architectures to microservices. LeanIX was founded in 2012 by Jörg Beyer and André Christ. The company’s
headquarter is in Bonn, Germany, with offices in Boston, Massachusetts, and Houston, Texas. A wide network of
partners provides support in America, Europe, and Australia.
LeanIX GmbH
Bonn
Germany
Page 8 of 8